]> Creatis software - bbtk.git/blobdiff - packages/std/src/bbstdSharedMemory.cxx
#3507 BackFace in PolyDataToActor Box
[bbtk.git] / packages / std / src / bbstdSharedMemory.cxx
index 75aea8742ac701d6ebfde7bd1d2f6d036a8e567a..71d928d07bef92fa970de38f4141ec18d41d1a78 100644 (file)
@@ -60,7 +60,7 @@ namespace bbstd
            // Get the name of the input which changed
            std::string input_name = c->GetConnection()->GetBlackBoxToInput();
            // Set the output to the value of the input which changed
-           bbSetOutputOut( bbGetInput(input_name) );   
+           bbSetOutputOut( bbGetInput(input_name) );
          }
        // No more change allowed
        mCanSet = false;
@@ -70,7 +70,8 @@ namespace bbstd
 
   void SharedMemory::bbUserSetDefaultValues()
   {
-    mCanSet = true;
+    mCanSet    = true;
+       firsttime       = true;
   }
   void SharedMemory::bbUserInitializeProcessing() 
   { 
@@ -81,7 +82,12 @@ namespace bbstd
   void SharedMemory::DoProcess()
   { 
     mCanSet = true;
-  }
+       if (firsttime==true)
+       {
+               firsttime = false;
+           bbSetOutputOut( bbGetInputIn() );   
+       } // if firsttime
+}
 
   BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,SharedMemory);
   BBTK_BLACK_BOX_IMPLEMENTATION(SharedMemory,bbtk::AtomicBlackBox);