]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/WorkspaceIO.cxx
...
[cpPlugins.git] / lib / cpPlugins / WorkspaceIO.cxx
index f7b25ca9f129ed26721bb7661b4ffdcf73728d66..0b48fc9ea6b0a74a577ab7b8e0d276f71cba38ad 100644 (file)
@@ -58,12 +58,17 @@ LoadWorkspace( const std::string& fname )
     float viewX = float( 0 ), viewY = float( 0 );
     filter->QueryFloatAttribute( "ViewX", &viewX );
     filter->QueryFloatAttribute( "ViewY", &viewY );
+    int explicit_re_execution = 0;
+    filter->QueryIntAttribute(
+      "ExplicitReExecution", &explicit_re_execution
+      );
     if( class_value != NULL && name_value != NULL )
     {
       if( this->CreateFilter( category_value, class_value, name_value ) )
       {
         auto new_filter = this->GetFilter( name_value );
         new_filter->SetViewCoords( viewX, viewY );
+        new_filter->SetExplicitReExecution( explicit_re_execution == 1 );
 
         // Read parameters
         auto parameters = new_filter->GetParameters( );
@@ -159,6 +164,9 @@ SaveWorkspace( const std::string& fname ) const
       e->SetAttribute( "name", vIt->first.c_str( ) );
       e->SetAttribute( "ViewX", filter->GetViewX( ) );
       e->SetAttribute( "ViewY", filter->GetViewY( ) );
+      e->SetAttribute(
+        "ExplicitReExecution", ( filter->GetExplicitReExecution( ) )? 1: 0
+        );
 
       auto params = filter->GetParameters( );
       params->ToXML( doc, e );