]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix the LongOp "isPerformed" method execution
authormpv <mikhail.ponikarov@opencascade.com>
Tue, 29 Jul 2014 11:13:04 +0000 (15:13 +0400)
committermpv <mikhail.ponikarov@opencascade.com>
Tue, 29 Jul 2014 11:13:04 +0000 (15:13 +0400)
src/Events/Events_LongOp.cpp

index ebfeb5677f764ef9826d85d8e4d68c6cfa639389..7cc46c3cda6ac9da4f7355eaabfbaa1667a1a12c 100644 (file)
@@ -26,14 +26,16 @@ Events_ID Events_LongOp::errorID()
 
 void Events_LongOp::start(void* theSender)
 {
-  if (MY_SENDERS.empty()) {
-    Events_LongOp anError(theSender);
-    Events_Loop::loop()->send(anError);
-  }
+  bool toSend = MY_SENDERS.empty();
   if (MY_SENDERS.find(theSender) == MY_SENDERS.end())
     MY_SENDERS[theSender] = 1;
   else 
     MY_SENDERS[theSender]++;
+
+  if (toSend) {
+    Events_LongOp anError(theSender);
+    Events_Loop::loop()->send(anError);
+  }
 }
 
 void Events_LongOp::end(void* theSender)