From: vsv Date: Wed, 5 Feb 2020 14:03:54 +0000 (+0300) Subject: Fix bug with editing of selection filters X-Git-Tag: V9_5_0a1~30 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=51ecd81e19518e2ed746e6e012ec2252a043b380;p=modules%2Fshaper.git Fix bug with editing of selection filters --- diff --git a/src/ModuleBase/ModuleBase_ViewerFilters.cpp b/src/ModuleBase/ModuleBase_ViewerFilters.cpp index c28b2eaa9..9a3c2f103 100644 --- a/src/ModuleBase/ModuleBase_ViewerFilters.cpp +++ b/src/ModuleBase/ModuleBase_ViewerFilters.cpp @@ -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