From: mpv Date: Thu, 24 Nov 2016 15:53:28 +0000 (+0300) Subject: Fix for the problem of selection with shift in the Group feature. X-Git-Tag: V_2.6.0~55 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=02a561a7f94e4062c5826f7dc20df5524d7b021e;p=modules%2Fshaper.git Fix for the problem of selection with shift in the Group feature. --- diff --git a/src/Model/Model_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index 2fdb15e68..e065c1e81 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -701,13 +701,22 @@ void Model_AttributeSelection::selectBody( } } - /// fix for issue 411: result modified shapes must not participate in this selection mechanism - FeaturePtr aFeatureOwner = std::dynamic_pointer_cast(owner()); - if (aFeatureOwner.get()) - aFeatureOwner->eraseResults(); if (!aContext.IsNull()) { + FeaturePtr aFeatureOwner = std::dynamic_pointer_cast(owner()); + bool aEraseResults = false; + if (aFeatureOwner.get()) { + aEraseResults = !aFeatureOwner->results().empty(); + if (aEraseResults) // erase results without flash deleted and redisplay: do it after Select + aFeatureOwner->removeResults(0, false); + } aSel.Select(aNewSub, aNewContext); + + if (aEraseResults) { // flash after Select : in Groups it makes selection with shift working + static Events_Loop* aLoop = Events_Loop::loop(); + static const Events_ID kDeletedEvent = aLoop->eventByName(EVENT_OBJECT_DELETED); + aLoop->flush(kDeletedEvent); + } } }