]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #905 Update of invalid feature representation in property panel
authornds <nds@opencascade.com>
Wed, 9 Sep 2015 13:16:10 +0000 (16:16 +0300)
committernds <nds@opencascade.com>
Wed, 9 Sep 2015 13:17:30 +0000 (16:17 +0300)
Correction for Part feature.

src/XGUI/XGUI_ErrorMgr.cpp

index 68e69b57a33f00a65e70f3043dc3cc95f911563f..8a92c1d62b47983ed1af9e3b2687030c8a660973 100644 (file)
@@ -83,11 +83,13 @@ void XGUI_ErrorMgr::updateActionState(QAction* theAction, const FeaturePtr& theF
     else
       theAction->setData(INVALID_VALUE);
   }
-
-  // update controls error information
-  QWidget* aWidget = myPropertyPanel->headerWidget();
-  if (aWidget)
-    aWidget->setToolTip(getFeatureError(theFeature));
+  // some operations have no property panel, so it is important to check that it is not null
+  if (myPropertyPanel) {
+    // update controls error information
+    QWidget* aWidget = myPropertyPanel->headerWidget();
+    if (aWidget)
+      aWidget->setToolTip(getFeatureError(theFeature));
+  }
 }
 
 const char* toString(ModelAPI_ExecState theExecState)