Program: bbtk
Module: $RCSfile: bbtkWxBlackBox.cxx,v $
Language: C++
- Date: $Date: 2008/04/18 12:59:16 $
- Version: $Revision: 1.12 $
+ Date: $Date: 2008/04/21 12:43:05 $
+ Version: $Revision: 1.13 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
"=> WxBlackBox::bbBackwardUpdate("
<<(caller?caller->GetFullName():"0")<<") ["
<<bbGetFullName()<<"]"<<std::endl);
-
- if (bbGetExecuting())
- {
- bbtkWarning(bbGetFullName()<<" : Cyclic execution stopped");
- return UPTODATE;
- }
- bbSetExecuting(true);
-
// If the caller is not the connection to the output widget
// and the output 'Widget' is connected then
- // we must execute the parent box
- bool done = false;
+ // we must execute the parent box
+ // but only one time
+ // (this is the role of the flag UpdateTransferedToParent=
if ( (caller==0) ||
((caller!=0)&&(caller->GetBlackBoxFromOutput()!="Widget"))
)
{
BlackBox::OutputConnectorMapType::const_iterator i
= bbGetOutputConnectorMap().find("Widget") ;
- if (
- i->second->GetConnectionVector().size() != 0 )
+ if ( i->second->GetConnectionVector().size() != 0 )
+
{
bbtkDebugMessage("Process",2,
- "-> Output 'Widget' connected : transfering execution to parent"
+ "-> Output 'Widget' connected : transfering update order to parent"
<<std::endl);
-
- i->second->GetConnectionVector().front().lock()
- ->GetBlackBoxTo()->bbExecute(false);
- done = true;
+ if ( bbGetUpdateTransferedToParent() )
+ {
+ bbSetUpdateTransferedToParent(false);
+ bbtkDebugMessage("Process",2,
+ " ... already transfered : abort"
+ <<std::endl);
+ }
+ else
+ {
+ bbSetUpdateTransferedToParent(true);
+ i->second->GetConnectionVector().front().lock()
+ ->GetBlackBoxTo()->bbExecute(false);
+ }
}
}
// call 'standard' BlackBox execution method
- if (!done)
+ if (!bbGetUpdateTransferedToParent())
{
- bbSetExecuting(false);
AtomicBlackBox::bbBackwardUpdate(caller);
}
"<= WxBlackBox::bbBackwardUpdate() ["
<<bbGetFullName()<<"]"<<std::endl);
- bbSetExecuting(false);
}
//=========================================================================