summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f6e0e4c)
Maybe make this configurable via ClientSettings in the future?
QModelIndex BufferModel::currentIndex() {
return propertyMapper()->selectionModel()->currentIndex();
}
QModelIndex BufferModel::currentIndex() {
return propertyMapper()->selectionModel()->currentIndex();
}
+
+void BufferModel::setCurrentIndex(const QModelIndex &newCurrent) {
+ standardSelectionModel()->setCurrentIndex(newCurrent, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
+ standardSelectionModel()->select(newCurrent, QItemSelectionModel::ClearAndSelect);
+}
void mapProperty(int column, int role, QObject *target, const QByteArray &property);
QModelIndex currentIndex();
void mapProperty(int column, int role, QObject *target, const QByteArray &property);
QModelIndex currentIndex();
+ void setCurrentIndex(const QModelIndex &newCurrent);
private:
SelectionModelSynchronizer _selectionModelSynchronizer;
private:
SelectionModelSynchronizer _selectionModelSynchronizer;
QModelIndex current = bufferModel()->currentIndex();
if(current.data(NetworkModel::BufferIdRole).value<BufferId>() == bufferId) {
// select the status buffer if the currently displayed buffer is about to be removed
QModelIndex current = bufferModel()->currentIndex();
if(current.data(NetworkModel::BufferIdRole).value<BufferId>() == bufferId) {
// select the status buffer if the currently displayed buffer is about to be removed
- QModelIndex newCurrent = current.sibling(0,0);
- bufferModel()->standardSelectionModel()->setCurrentIndex(newCurrent, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
- bufferModel()->standardSelectionModel()->select(newCurrent, QItemSelectionModel::ClearAndSelect);
+ bufferModel()->setCurrentIndex(current.sibling(0,0));
}
networkModel()->removeBuffer(bufferId);
}
networkModel()->removeBuffer(bufferId);
}
void InputWidget::setNetwork(const Network *network) {
}
void InputWidget::setNetwork(const Network *network) {
- if(_networkId == network->networkId())
+ if(!network || _networkId == network->networkId())
return;
const Network *previousNet = Client::network(_networkId);
return;
const Network *previousNet = Client::network(_networkId);
update(parent);
expand(parent);
}
update(parent);
expand(parent);
}
+
+
+ // select newly inserted buffers
+ if(parent.data(NetworkModel::ItemTypeRole) != NetworkModel::NetworkItemType)
+ return;
+
+ QModelIndex newCurrent = parent.child(end, 0);
+ selectionModel()->setCurrentIndex(newCurrent, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
+ selectionModel()->select(newCurrent, QItemSelectionModel::ClearAndSelect);
}
void BufferView::toggleHeader(bool checked) {
}
void BufferView::toggleHeader(bool checked) {
quasselVersion = "0.2.0-pre";
quasselDate = "2008-02-22";
quasselVersion = "0.2.0-pre";
quasselDate = "2008-02-22";
//! Minimum client build number the core needs
clientBuildNeeded = 563;
//! Minimum client build number the core needs
clientBuildNeeded = 563;