X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetValidated.cpp;h=caadc6be7582cc17eb8121963161c657c171b058;hb=872ac5e3e0196ad70c2a01a79bd070c9a7d4a2e6;hp=4db4e4bbcfe415003927d94fd47868dbc1bc3267;hpb=af899dd91be39cdb63992c001908f27833835174;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetValidated.cpp b/src/ModuleBase/ModuleBase_WidgetValidated.cpp index 4db4e4bbc..caadc6be7 100644 --- a/src/ModuleBase/ModuleBase_WidgetValidated.cpp +++ b/src/ModuleBase/ModuleBase_WidgetValidated.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -69,6 +70,16 @@ bool ModuleBase_WidgetValidated::isValidSelection(const ModuleBase_ViewerPrs& th anAttribute->blockSetInitialized(isAttributeBlocked); aLoop->activateFlushes(true); + // In particular case the results are deleted and called as redisplayed inside of this + // highlight-selection, to they must be flushed as soon as possible. + // Example: selection of group-vertices subshapes with shift pressend on body. Without + // these 4 lines below the application crashes because of left presentations on + // removed results still in the viewer. + static Events_ID aDeletedEvent = Events_Loop::eventByName(EVENT_OBJECT_DELETED); + static Events_ID aRedispEvent = Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY); + aLoop->flush(aDeletedEvent); + aLoop->flush(aRedispEvent); + return aValid; }