From: mpv Date: Tue, 29 Jul 2014 11:13:04 +0000 (+0400) Subject: Fix the LongOp "isPerformed" method execution X-Git-Tag: V_0.4.4~134 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c236c89d25c35cbb6e7b9ef3777ebd728017c4f3;p=modules%2Fshaper.git Fix the LongOp "isPerformed" method execution --- diff --git a/src/Events/Events_LongOp.cpp b/src/Events/Events_LongOp.cpp index ebfeb5677..7cc46c3cd 100644 --- a/src/Events/Events_LongOp.cpp +++ b/src/Events/Events_LongOp.cpp @@ -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)