X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fbufferview.cpp;h=b5460db2024fc3755f032cf12916a9059ff141c3;hp=17f637b57602d29f10a5c1d5cb38f4b911a258cc;hb=902250c45365e890396e0a9833ac56b31f173604;hpb=894d66d1d86ccebf9df99e03bc3c174959e7ce76 diff --git a/src/qtui/bufferview.cpp b/src/qtui/bufferview.cpp index 17f637b5..b5460db2 100644 --- a/src/qtui/bufferview.cpp +++ b/src/qtui/bufferview.cpp @@ -96,7 +96,10 @@ void BufferView::keyPressEvent(QKeyEvent *event) { // ensure that newly inserted network nodes are expanded per default void BufferView::rowsInserted(const QModelIndex & parent, int start, int end) { - if(parent == QModelIndex()) - setExpanded(model()->index(start, 0, parent), true); QTreeView::rowsInserted(parent, start, end); + if(model()->rowCount(parent) == 1 && parent != QModelIndex()) { + // without updating the parent the expand will have no effect... Qt Bug? + update(parent); + expand(parent); + } }