]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix bug with editing of selection filters
authorvsv <vsv@opencascade.com>
Wed, 5 Feb 2020 14:03:54 +0000 (17:03 +0300)
committervsr <vsr@opencascade.com>
Mon, 10 Feb 2020 14:12:02 +0000 (17:12 +0300)
src/ModuleBase/ModuleBase_ViewerFilters.cpp

index c28b2eaa9b2ce1713e89c6ece76ac17e0b7773cc..9a3c2f103160c9b8339cfe993353b39956703f89 100644 (file)
@@ -80,11 +80,12 @@ Standard_Boolean ModuleBase_ShapeDocumentFilter::IsOk(
       DocumentPtr aDoc = aObj->document();
       SessionPtr aMgr = ModelAPI_Session::get();
 
-      ModuleBase_ModelWidget* aWidget = anOperation->propertyPanel()->activeWidget();
-      if (aWidget && aWidget->canUseExternalParts())
-        aValid = Standard_True;
-      else
-        aValid = (aDoc == aMgr->activeDocument() || aDoc == aMgr->moduleDocument());
+      if (anOperation->propertyPanel()) {
+        ModuleBase_ModelWidget* aWidget = anOperation->propertyPanel()->activeWidget();
+        if (aWidget && aWidget->canUseExternalParts())
+          return Standard_True;
+      }
+      return (aDoc == aMgr->activeDocument() || aDoc == aMgr->moduleDocument());
     }
     else {
       // This object is not controlled by the filter