From a0cc0d2625f613fd29cc53f9a3c8dfb56e40406a Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 4 Jun 2015 11:50:09 +0300 Subject: [PATCH] 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. --- src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp | 3 --- src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp | 3 --- 2 files changed, 6 deletions(-) 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; } -- 2.39.2