myIsEditEnabled = getApp()->isEditEnabled();
getApp()->setEditEnabled(false);
- // this following row is caused by #187 bug.
- // SALOME saves the dock widget positions before deactivateModule() and
- // load it after the module activation. So, if the panel is visible before
- // deactivate, it becomes visible after activate.
- // In order to avoid the visible property panel, the widget position save is
- // switch off in this module
- aResMgr->setValue("Study", "store_positions", false);
-
// Synchronize displayed objects
Handle(AIS_InteractiveContext) aContext;
if (mySelector && mySelector->viewer())
{
LightApp_Module::updateModuleVisibilityState();
onWhatIs(myIsInspectionVisible);
+
+ // the following code is caused by #187 bug.
+ // SALOME saves the dock widget positions before deactivateModule() and
+ // load it after the module activation. So, if the panel is visible before
+ // deactivate, it becomes visible after activate.
+ // In order to avoid the visible property panel, we hide it here
+ ModuleBase_Operation* anOperation = myWorkshop->module()->currentOperation();
+ if (!anOperation) {
+ myWorkshop->hidePanel(myWorkshop->propertyPanel());
+ }
}
void SHAPERGUI::onEditToolbars()
//******************************************************
void XGUI_Workshop::hidePanel(QDockWidget* theDockWidget)
{
- if (theDockWidget && theDockWidget == myPropertyPanel) {
+ if (!theDockWidget) return;
+
+ if (theDockWidget == myPropertyPanel) {
QAction* aViewAct = theDockWidget->toggleViewAction();
///<! Do not allow to show empty property panel
aViewAct->setEnabled(false);
}
+
theDockWidget->hide();
// the property panel is active window of the desktop, when it is