]> Creatis software - creaRigidRegistration.git/blobdiff - PackRecalage/src/bbPackRecalageImageSwitcherBox.cxx
*** empty log message ***
[creaRigidRegistration.git] / PackRecalage / src / bbPackRecalageImageSwitcherBox.cxx
index 760207d26150f7b678715bd927014edbac8c9a70..1c603f6c17b3b5cc2da47a47cd2490c4e7d5d43a 100644 (file)
@@ -25,6 +25,7 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ImageSwitcherBox,bbtk::WxBlackBox);
 void ImageSwitcherBox::Process()
 {
        time = bbGetInputTime();
+       _on = bbGetInputOn();
                
        if(myTimer == NULL)
        {
@@ -32,13 +33,14 @@ void ImageSwitcherBox::Process()
                myTimer->Start(time);
                oldTime = time;
        }
-       else if(oldTime != time && myTimer != NULL)
+       
+       if(oldTime != time && myTimer !=NULL)
        {
                myTimer->Stop();
                myTimer->Start(time);
                oldTime = time;
        }
-
+       
        if(change == false)
        {
                bbSetOutputOut(bbGetInputIn1());
@@ -48,7 +50,7 @@ void ImageSwitcherBox::Process()
        {
                bbSetOutputOut(bbGetInputIn2());
                change = false;
-       }
+       }       
 }
 void ImageSwitcherBox::CreateWidget(wxWindow* parent)
 {
@@ -60,6 +62,7 @@ void ImageSwitcherBox::bbUserSetDefaultValues()
        change = false;
        time = 500;
        oldTime = 500;
+       _on = false;
 }
 void ImageSwitcherBox::bbUserInitializeProcessing()
 {