From 02a561a7f94e4062c5826f7dc20df5524d7b021e Mon Sep 17 00:00:00 2001 From: mpv Date: Thu, 24 Nov 2016 18:53:28 +0300 Subject: [PATCH] Fix for the problem of selection with shift in the Group feature. --- src/Model/Model_AttributeSelection.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) 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); + } } } -- 2.39.2