]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
The crash is: click Sketch feature, abort(without plane selection), click Sketch...
authornds <natalia.donis@opencascade.com>
Wed, 8 Apr 2015 07:35:18 +0000 (10:35 +0300)
committernds <natalia.donis@opencascade.com>
Wed, 8 Apr 2015 07:35:18 +0000 (10:35 +0300)
src/ModuleBase/ModuleBase_FilterValidated.cpp
src/PartSet/PartSet_WidgetSketchLabel.cpp
src/XGUI/XGUI_Displayer.cpp

index a6336d3533360bdf3c7c3f7e345ca44a297a4dfe..5bb26dac55ac995691f02fc411ba322317e6ba63 100644 (file)
@@ -18,8 +18,10 @@ IMPLEMENT_STANDARD_RTTIEXT(ModuleBase_FilterValidated, SelectMgr_Filter);
 Standard_Boolean ModuleBase_FilterValidated::IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const
 {
   ModuleBase_Operation* anOperation = myWorkshop->module()->currentOperation();
-  ModuleBase_IPropertyPanel* aPanel = anOperation->propertyPanel();
+  if (!anOperation)
+    return true;
 
+  ModuleBase_IPropertyPanel* aPanel = anOperation->propertyPanel();
   ModuleBase_ModelWidget* anActiveWidget = aPanel->activeWidget();
   ModuleBase_WidgetValidated* aWidgetValidated = dynamic_cast<ModuleBase_WidgetValidated*>
                                                                           (anActiveWidget);
index 6be038d19d803a84cf839d7dc1e6e7e97e6e7f7f..af8e9d56af5061f563fe2ca5a854b61e09b39307 100644 (file)
@@ -245,6 +245,7 @@ void PartSet_WidgetSketchLabel::deactivate()
   //XGUI_Displayer* aDisp = myWorkshop->displayer();
   //aDisp->closeLocalContexts();
   erasePreviewPlanes();
+  activateFilters(myWorkshop->module()->workshop(), false);
 }
 
 void PartSet_WidgetSketchLabel::erasePreviewPlanes()
index cbe4bb8fe0235dcd4033d554b039711c6eae0132..57cb4980184dcd53395de57db0d13164a03e1cc5 100644 (file)
@@ -706,7 +706,9 @@ void XGUI_Displayer::removeSelectionFilter(const Handle(SelectMgr_Filter)& theFi
   Handle(AIS_InteractiveContext) aContext = AISContext();
   if (aContext.IsNull())
     return;
-  GetFilter()->Remove(theFilter);
+  Handle(SelectMgr_AndFilter) aCompositeFilter = GetFilter();
+  if (aCompositeFilter->IsIn(theFilter))
+    aCompositeFilter->Remove(theFilter);
 }
 
 void XGUI_Displayer::removeFilters()