From: nds Date: Thu, 4 Jun 2015 08:50:09 +0000 (+0300) Subject: A fix for activate/deactivate selection from destructor. It is possible, that selecti... X-Git-Tag: V_1.2.1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a0cc0d2625f613fd29cc53f9a3c8dfb56e40406a;p=modules%2Fshaper.git A fix for activate/deactivate selection from destructor. It is possible, that selection mode is not correct by a widget activation. Scenario: sketch, create a poligon, start parallel operation, select two lines, result - a create new parallel feature operation is started. The first control is active, but previous parallel constraint is selectable. This is wrong. If the next operation is translation, the parallel constraint selection leads to crash. Reason: The activateShapeSselection(false) called in the destructor of widget shape selector is called after starting/activation of a widget in a new operation. So, it clears the previous activation of the current operation, deactivate reset it. --- diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp index 45b7a2053..d20ddf8e8 100644 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp @@ -100,9 +100,6 @@ ModuleBase_WidgetMultiSelector::ModuleBase_WidgetMultiSelector(QWidget* theParen ModuleBase_WidgetMultiSelector::~ModuleBase_WidgetMultiSelector() { - activateShapeSelection(false); - activateFilters(myWorkshop, false); - delete myShapeValidator; } diff --git a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp index b021cb0b7..cf5f6549e 100644 --- a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp @@ -102,9 +102,6 @@ ModuleBase_WidgetShapeSelector::ModuleBase_WidgetShapeSelector(QWidget* theParen //******************************************************************** ModuleBase_WidgetShapeSelector::~ModuleBase_WidgetShapeSelector() { - activateSelection(false); - activateFilters(myWorkshop, false); - delete myShapeValidator; }