Salome HOME
Selection priority in Sketch, clear selection when sketch goes from entity to neutral...
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetSelector.cpp
index ce06eb4a63673f628a4fd1cab95b20e5bf4b9160..caa9c798b476182f4e98df1cda537e894cfcca93 100755 (executable)
 #include <ModuleBase_IModule.h>
 #include <ModuleBase_ResultPrs.h>
 #include <ModuleBase_ViewerPrs.h>
+#include <ModuleBase_Events.h>
 
 #include <ModelAPI_ResultConstruction.h>
+#include <ModelAPI_Events.h>
 
 #include <TopoDS_Iterator.hxx>
 
@@ -163,7 +165,9 @@ void ModuleBase_WidgetSelector::activateCustom()
   activateSelectionAndFilters(true);
 
   // Restore selection in the viewer by the attribute selection list
-  myWorkshop->setSelected(getAttributeSelection());
+  // it should be postponed to have current widget as active to validate restored selection
+  static Events_ID anEvent = Events_Loop::eventByName(EVENT_UPDATE_BY_WIDGET_SELECTION);
+  ModelAPI_EventCreator::get()->sendUpdated(myFeature, anEvent);
 }
 
 //********************************************************************