]> Creatis software - creaVtk.git/blobdiff - bbtk_creaVtk_PKG/src/bbcreaVtkMeshManager_tool.cxx
#3507 Undo and Redo Meshes
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkMeshManager_tool.cxx
index d0f63ed3017600b637bf926fb586e9f7e1f0f40c..cf99baf507ec3ec1682307e9b77f521f25c262c8 100644 (file)
@@ -31,12 +31,14 @@ void MeshManager_tool::Process()
     {
         if (bbGetInputTool()==10) // Undo
         {
-            printf("EED Warning!   MeshManager_tool Undo   Not implemented.\n");
+               bbGetInputMeshManagerModel()->Undo();
+            //printf("EED Warning!   MeshManager_tool Undo   Not implemented.\n");
         } // if Tool 10 Undo
         
         if (bbGetInputTool()==20) // Redo
         {
-            printf("EED Warning!   MeshManager_tool Redo   Not implemented.\n");
+               bbGetInputMeshManagerModel()->Redo();
+            //printf("EED Warning!   MeshManager_tool Redo   Not implemented.\n");
         } // if Tool 20 Redo
 
         if (bbGetInputTool()==30)  // Set
@@ -66,6 +68,24 @@ void MeshManager_tool::Process()
             bbGetInputMeshManagerModel()->ResetMeshTemp();
         } // if Tool 40 Reset
         
+        if(bbGetInputTool() == 50) // Set Array of Meshes
+        {
+               if(bbGetInputMeshes().size() > 1)
+               {
+                       bbGetInputMeshManagerModel()->ReplaceMesh(bbGetInputMeshes());
+                   }
+        }
+        if(bbGetInputTool() == 60) // Select Mesh by Name
+        {
+               if(!bbGetInputStringParam().empty())
+               {
+                       bbGetInputMeshManagerModel()->SelectMeshByName(bbGetInputStringParam());
+                   }
+        }
+        if(bbGetInputTool() == 70) // Delete Current Mesh
+        {
+                   bbGetInputMeshManagerModel()->DeleteCurrentMesh();
+        }
     } else {
         printf("EED Warning! MeshManager_tool : MeshManagerModel not defined. \n");
     }// if MeshManagerModel != NULL