From 855e3fd72450815334de3223c59d60f27735f152 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Thu, 19 Sep 2019 12:25:26 +0800 Subject: [PATCH] Gui: fix missing tree view sync after drag and drop --- src/Gui/Tree.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Gui/Tree.cpp b/src/Gui/Tree.cpp index b5972bfb2e..3178ece610 100644 --- a/src/Gui/Tree.cpp +++ b/src/Gui/Tree.cpp @@ -2095,6 +2095,12 @@ void TreeWidget::dropEvent(QDropEvent *event) if(touched && TreeParams::Instance()->RecomputeOnDrop()) thisDoc->recompute(); + + if(touched && TreeParams::Instance()->SyncView()) { + auto gdoc = Application::Instance->getDocument(thisDoc); + if(gdoc) + gdoc->setActiveView(); + } } void TreeWidget::drawRow(QPainter *painter, const QStyleOptionViewItem &options, const QModelIndex &index) const