X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_WidgetFeaturePointSelector.cpp;h=f44ca020954120fcca6e350e97f48e3fe0d9514a;hb=d7144bf137b2ea4f8c7bfbc6b678e1a762e98653;hp=1b4be74c099191fe1905422c064dd38050f389ac;hpb=dc7d4d86b58b81684abc9b5a2be8ec30f210c2da;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_WidgetFeaturePointSelector.cpp b/src/PartSet/PartSet_WidgetFeaturePointSelector.cpp index 1b4be74c0..f44ca0209 100644 --- a/src/PartSet/PartSet_WidgetFeaturePointSelector.cpp +++ b/src/PartSet/PartSet_WidgetFeaturePointSelector.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2019 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -12,10 +12,9 @@ // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or -// email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #include @@ -92,8 +91,8 @@ void PartSet_WidgetFeaturePointSelector::updateSelectionModesAndFilters(bool toA Handle(AIS_InteractiveContext) aContext = XGUI_Tools::workshop(myWorkshop)->viewer()->AISContext(); Quantity_Color aColor; - Handle(Graphic3d_HighlightStyle) aHStyle = aContext->HighlightStyle(); - Handle(Graphic3d_HighlightStyle) aSStyle = aContext->SelectionStyle(); + Handle(Prs3d_Drawer) aHStyle = aContext->HighlightStyle(); + Handle(Prs3d_Drawer) aSStyle = aContext->SelectionStyle(); if (toActivate) { std::vector aColors; aColors = Config_PropManager::color("Visualization", "sketch_entity_color"); @@ -175,9 +174,12 @@ void PartSet_WidgetFeaturePointSelector::mouseReleased(ModuleBase_IViewWindow* t updateObject(feature()); - emit focusOutWidget(this); // we need to deselect base feature for better visibility of selected feature XGUI_Tools::workshop(myWorkshop)->displayer()->clearSelected(false); + + // focusOutWidget should be the last functionality in the method because after this emit, + // the widget may be deleted and members of this class are deleted (e.g. myWorkshop) + emit focusOutWidget(this); } //********************************************************************