diff --git a/src/Gui/Tree.cpp b/src/Gui/Tree.cpp index c029ed43fc..eaaa160c0b 100644 --- a/src/Gui/Tree.cpp +++ b/src/Gui/Tree.cpp @@ -2633,14 +2633,14 @@ void TreeWidget::onItemSelectionChanged () _LastSelectedTreeWidget = this; + // block tmp. the connection to avoid to notify us ourself + bool lock = this->blockConnection(true); + if(selectTimer->isActive()) onSelectTimer(); else _updateStatus(false); - // block tmp. the connection to avoid to notify us ourself - bool lock = this->blockConnection(true); - auto selItems = selectedItems(); // do not allow document item multi-selection @@ -4120,6 +4120,7 @@ void DocumentItem::selectItems(bool sync) { item->setSelected(false); }else if(item->selected) { if(item->selected == 2) { + // This means newly selected if(!first) first = item; if(sync) @@ -4134,10 +4135,10 @@ void DocumentItem::selectItems(bool sync) { if(sync) { if(!first) first = last; - if(first) { - getTree()->scrollToItem(first); + else getTree()->syncView(first->object()); - } + if(first) + getTree()->scrollToItem(first); } }