-// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
document()->setCurrentFeatureUp();
}
- static Events_Loop* aLoop = Events_Loop::loop();
- static Events_ID EVENT_DISP = aLoop->eventByName(EVENT_OBJECT_TO_REDISPLAY);
- static const ModelAPI_EventCreator* aECreator = ModelAPI_EventCreator::get();
-
while (!myResults.empty()) { // remove one by one with messages
std::shared_ptr<ModelAPI_Result> aRes = *(myResults.begin());
aRes->setDisabled(aRes, true); // to avoid activation of the Part result
(*aResIter)->setDisabled(*aResIter, false);
}
// update selection for the case something was updated higher in the history
- // while this feature was disabled
+ // while this feature was disabled, but avoid flushing it immediately and
+ // wait while all the previous features update myIsDisabled flag
+ // (flush will be called by the document)
static Events_Loop* aLoop = Events_Loop::loop();
static Events_ID kUpdatedSel = aLoop->eventByName(EVENT_UPDATE_SELECTION);
static const ModelAPI_EventCreator* aECreator = ModelAPI_EventCreator::get();
- aECreator->sendUpdated(data()->owner(), kUpdatedSel, false);
+ aECreator->sendUpdated(data()->owner(), kUpdatedSel, true);
}
return true;
}
return myIsStable;
}
-bool ModelAPI_Feature::customAction(const std::string& theActionId)
+bool ModelAPI_Feature::customAction(const std::string& /*theActionId*/)
{
return false;
}