//******************************************************
SHAPERGUI::SHAPERGUI()
: LightApp_Module("SHAPER"),
- mySelector(0), myIsOpened(0), myPopupMgr(0)
+ mySelector(0), myIsOpened(0), myPopupMgr(0), myIsInspectionVisible(false),
+ myInspectionPanel(0)
{
myWorkshop = new XGUI_Workshop(this);
connect(myWorkshop, SIGNAL(commandStatusUpdated()),
//******************************************************
SHAPERGUI::~SHAPERGUI()
{
+ delete myWorkshop;
+ delete myProxyViewer;
}
//******************************************************
desktop()->tabifyDockWidget(aObjDoc, myWorkshop->propertyPanel());
}
- QDockWidget* aInspection = myWorkshop->inspectionPanel();
- if (aInspection) {
- QAction* aViewAct = aInspection->toggleViewAction();
- aViewAct->setEnabled(true);
+ if (!myInspectionPanel) {
+ myInspectionPanel = myWorkshop->inspectionPanel();
+ QAction* aViewAct = myInspectionPanel->toggleViewAction();
connect(aViewAct, SIGNAL(toggled(bool)), this, SLOT(onWhatIs(bool)));
}
+ myInspectionPanel->toggleViewAction()->setEnabled(true);
if (!mySelector) {
ViewManagerList OCCViewManagers;
QAction* aViewAct = aObjDoc->toggleViewAction();
aViewAct->setEnabled(false);
}
- QDockWidget* aInspection = myWorkshop->inspectionPanel();
- if (aInspection) {
- aInspection->setVisible(false);
- QAction* aViewAct = aInspection->toggleViewAction();
- aViewAct->setEnabled(false);
- }
+
+ myIsInspectionVisible = myInspectionPanel->isVisible();
+ myInspectionPanel->hide();
+ QAction* aViewAct = myInspectionPanel->toggleViewAction();
+ aViewAct->setEnabled(false);
// the active operation should be stopped for the next activation.
// There should not be active operation and visualized preview.
void SHAPERGUI::onWhatIs(bool isToggled)
{
- QDockWidget* aInspection = myWorkshop->inspectionPanel();
if (sender() == myWhatIsAction) {
- QAction* aViewAct = aInspection->toggleViewAction();
+ QAction* aViewAct = myInspectionPanel->toggleViewAction();
aViewAct->blockSignals(true);
aViewAct->setChecked(isToggled);
aViewAct->blockSignals(false);
- aInspection->setVisible(isToggled);
+ myInspectionPanel->setVisible(isToggled);
}
else {
myWhatIsAction->blockSignals(true);
myWhatIsAction->setChecked(isToggled);
myWhatIsAction->blockSignals(false);
+ myInspectionPanel->setVisible(isToggled);
}
-}
\ No newline at end of file
+}
+
+void SHAPERGUI::updateModuleVisibilityState()
+{
+ LightApp_Module::updateModuleVisibilityState();
+ onWhatIs(myIsInspectionVisible);
+}