void ModuleBase_Operation::abort()
{
+ // the viewer update should be blocked in order to avoid the features blinking before they are
+ // hidden
+ std::shared_ptr<Events_Message> aMsg = std::shared_ptr<Events_Message>(
+ new Events_Message(Events_Loop::eventByName(EVENT_UPDATE_VIEWER_BLOCKED)));
+ Events_Loop::loop()->send(aMsg);
+
if (myIsEditing) {
SessionPtr aMgr = ModelAPI_Session::get();
DocumentPtr aDoc = aMgr->activeDocument();
ModelAPI_Session::get()->abortOperation();
emit stopped();
+ // the viewer update should be unblocked in order to avoid the features blinking before they are
+ // hidden
+ aMsg = std::shared_ptr<Events_Message>(
+ new Events_Message(Events_Loop::eventByName(EVENT_UPDATE_VIEWER_UNBLOCKED)));
+
+ Events_Loop::loop()->send(aMsg);
}
bool ModuleBase_Operation::commit()
} else if (theMessage->eventID() == Events_Loop::eventByName(EVENT_UPDATE_VIEWER_UNBLOCKED)) {
// the viewer's update context is unblocked, the viewer's update works
myDisplayer->enableUpdateViewer(true);
+ myDisplayer->updateViewer();
} else {
//Show error dialog if error message received.
std::shared_ptr<Events_Error> anAppError = std::dynamic_pointer_cast<Events_Error>(theMessage);