Gui: change DAG view selection behavior

If there is selection, then DAG view will show the owner document of
the resolved selected object instead of the active document.
This commit is contained in:
Zheng, Lei
2019-12-14 21:29:54 +08:00
committed by wmayer
parent 5a32181b64
commit 15944dde60
2 changed files with 30 additions and 15 deletions

View File

@@ -150,6 +150,12 @@ Model::Model(QObject *parentIn, const Gui::Document &documentIn) : QGraphicsScen
connectChgObject = documentIn.signalChangedObject.connect(boost::bind(&Model::slotChangeObject, this, _1, _2));
connectEdtObject = documentIn.signalInEdit.connect(boost::bind(&Model::slotInEdit, this, _1));
connectResObject = documentIn.signalResetEdit.connect(boost::bind(&Model::slotResetEdit, this, _1));
for (auto obj : documentIn.getDocument()->getObjects()) {
auto vpd = Base::freecad_dynamic_cast<Gui::ViewProviderDocumentObject>(documentIn.getViewProvider(obj));
if (vpd)
slotNewObject(*vpd);
}
}
Model::~Model()