X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fbufferview.cpp;h=9b1b93cab05487e9cc7bc7eee1d01fcfd41663f0;hp=4ac92f3d363b2210875307144ed9a7b84c343735;hb=e8903b1f19c183a537d7b31b7fd709dde1a69ef5;hpb=6bd0b562428184b3b4b2f50bac429bb20ce6a986 diff --git a/src/uisupport/bufferview.cpp b/src/uisupport/bufferview.cpp index 4ac92f3d..9b1b93ca 100644 --- a/src/uisupport/bufferview.cpp +++ b/src/uisupport/bufferview.cpp @@ -76,7 +76,7 @@ void BufferView::setModel(QAbstractItemModel *model) { QString sectionName; QAction *showSection; - for(int i = 0; i < model->columnCount(); i++) { + for(int i = 1; i < model->columnCount(); i++) { sectionName = (model->headerData(i, Qt::Horizontal, Qt::DisplayRole)).toString(); showSection = new QAction(sectionName, header()); showSection->setCheckable(true); @@ -118,15 +118,6 @@ void BufferView::rowsInserted(const QModelIndex & parent, int start, int end) { 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) {