Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Gui: minor change to tree view document restore handling
  • Loading branch information
realthunder authored and wwmayer committed Sep 7, 2019
1 parent 84f2cc4 commit 636f5e9
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/Gui/Tree.cpp
Expand Up @@ -2383,15 +2383,14 @@ void TreeWidget::onUpdateStatus(void)
docItem->populateObject(obj);
docItem->PopulateObjects.clear();

if(docItem->connectChgObject.connected())
continue;

auto doc = v.first->getDocument();

docItem->connectChgObject = docItem->document()->signalChangedObject.connect(
boost::bind(&TreeWidget::slotChangeObject, this, _1, _2));
docItem->connectTouchedObject = doc->signalTouchedObject.connect(
boost::bind(&TreeWidget::slotTouchedObject, this, _1));
if(!docItem->connectChgObject.connected()) {
docItem->connectChgObject = docItem->document()->signalChangedObject.connect(
boost::bind(&TreeWidget::slotChangeObject, this, _1, _2));
docItem->connectTouchedObject = doc->signalTouchedObject.connect(
boost::bind(&TreeWidget::slotTouchedObject, this, _1));
}

if(doc->testStatus(App::Document::PartialDoc))
docItem->setIcon(0, *documentPartialPixmap);
Expand Down

0 comments on commit 636f5e9

Please sign in to comment.