Gui: make Clipping widget a dockable widget so that it can be used while a task dialog is open

This commit is contained in:
wmayer
2020-09-04 11:54:52 +02:00
parent aa6f060365
commit c176f714f1
4 changed files with 68 additions and 47 deletions

View File

@@ -529,9 +529,12 @@ void StdCmdToggleClipPlane::activated(int iMsg)
view->toggleClippingPlane();
}
#else
View3DInventor* view = qobject_cast<View3DInventor*>(getMainWindow()->activeWindow());
if (view) {
Gui::Control().showDialog(new Gui::Dialog::TaskClipping(view));
static QPointer<Gui::Dialog::Clipping> clipping = nullptr;
if (!clipping) {
View3DInventor* view = qobject_cast<View3DInventor*>(getMainWindow()->activeWindow());
if (view) {
clipping = Gui::Dialog::Clipping::makeDockWidget(view);
}
}
#endif
}
@@ -553,9 +556,8 @@ bool StdCmdToggleClipPlane::isActive(void)
return false;
}
#else
if (Gui::Control().activeDialog())
return false;
return true;
View3DInventor* view = qobject_cast<View3DInventor*>(getMainWindow()->activeWindow());
return view ? true : false;
#endif
}