Salome HOME
[bos #29098] Help panel for SHAPER module. Eliminate the limitation on store/restore...
[modules/shaper.git] / src / XGUI / XGUI_Workshop.cpp
index 8859ef6546a163852b28fd902d1389e201563700..124ac7bc109ce985c6e7ca3d7b81767053ce3e05 100644 (file)
@@ -1728,11 +1728,14 @@ void XGUI_Workshop::showPanel(QDockWidget* theDockWidget)
 //******************************************************
 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