X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=gui%2Fbufferview.cpp;h=d30e4da1172fb9878fe8039e87bde098b8f44979;hp=7e2cf2175fd723dc1dda53b644f002e38004eb2a;hb=4ccba157efd91e531a3106012f5d54ba372a0292;hpb=9d4be7eefb855df7efe6d140bc498cc574140466;ds=sidebyside diff --git a/gui/bufferview.cpp b/gui/bufferview.cpp index 7e2cf217..d30e4da1 100644 --- a/gui/bufferview.cpp +++ b/gui/bufferview.cpp @@ -75,6 +75,8 @@ bool BufferViewFilter::filterAcceptsRow(int source_row, const QModelIndex &sourc /***************************************** * The TreeView showing the Buffers *****************************************/ +// Please be carefull when reimplementing methods which are used to inform the view about changes to the data +// to be on the safe side: call QTreeView's method aswell BufferView::BufferView(QWidget *parent) : QTreeView(parent) { } @@ -90,6 +92,8 @@ void BufferView::init() { connect(selectionModel(), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)), model(), SLOT(changeCurrent(const QModelIndex &, const QModelIndex &))); connect(this, SIGNAL(doubleClicked(const QModelIndex &)), model(), SLOT(doubleClickReceived(const QModelIndex &))); connect(model(), SIGNAL(updateSelection(const QModelIndex &, QItemSelectionModel::SelectionFlags)), selectionModel(), SLOT(select(const QModelIndex &, QItemSelectionModel::SelectionFlags))); + + expandAll(); } void BufferView::setFilteredModel(QAbstractItemModel *model, BufferViewFilter::Modes mode, QStringList nets) { @@ -108,5 +112,6 @@ void BufferView::dragEnterEvent(QDragEnterEvent *event) { } void BufferView::rowsInserted(const QModelIndex & parent, int start, int end) { - setExpanded(parent, true); + if(parent.parent() == QModelIndex()) setExpanded(parent, true); + QTreeView::rowsInserted(parent, start, end); }