From: nds Date: Wed, 8 Apr 2015 07:35:18 +0000 (+0300) Subject: The crash is: click Sketch feature, abort(without plane selection), click Sketch... X-Git-Tag: V_1.1.0~54^2~7^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=60855dd590f9054e50dd1bd36aa0b984ee97b02a;p=modules%2Fshaper.git The crash is: click Sketch feature, abort(without plane selection), click Sketch feature, chose the plane, create a triangle by lines, select a last point ->crash. The reason is not deactivated face validator of widget sketch label. --- diff --git a/src/ModuleBase/ModuleBase_FilterValidated.cpp b/src/ModuleBase/ModuleBase_FilterValidated.cpp index a6336d353..5bb26dac5 100644 --- a/src/ModuleBase/ModuleBase_FilterValidated.cpp +++ b/src/ModuleBase/ModuleBase_FilterValidated.cpp @@ -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 (anActiveWidget); diff --git a/src/PartSet/PartSet_WidgetSketchLabel.cpp b/src/PartSet/PartSet_WidgetSketchLabel.cpp index 6be038d19..af8e9d56a 100644 --- a/src/PartSet/PartSet_WidgetSketchLabel.cpp +++ b/src/PartSet/PartSet_WidgetSketchLabel.cpp @@ -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() diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index cbe4bb8fe..57cb49801 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -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()