activate/create 3d view when setting or getting active objects

This commit is contained in:
wmayer
2019-07-05 18:53:35 +02:00
parent 8b0ee4c4a2
commit c3763479da
7 changed files with 13 additions and 2 deletions

View File

@@ -94,12 +94,14 @@ bool ViewProviderPart::doubleClicked(void)
if (activePart == this->getObject()){
//active part double-clicked. Deactivate.
Gui::Command::doCommand(Gui::Command::Gui,
"Gui.activateView('Gui::View3DInventor', True)\n"
"Gui.getDocument('%s').ActiveView.setActiveObject('%s', None)",
this->getObject()->getDocument()->getName(),
PARTKEY);
} else {
//set new active part
Gui::Command::doCommand(Gui::Command::Gui,
"Gui.activateView('Gui::View3DInventor', True)\n"
"Gui.getDocument('%s').ActiveView.setActiveObject('%s', App.getDocument('%s').getObject('%s'))",
this->getObject()->getDocument()->getName(),
PARTKEY,