]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/ManualPaintModel.cpp
DFCH: ManualPaint + imageUndoRedo: Undo/Redo functionality its now working =) =)
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / manualPaint / ManualPaintModel.cpp
index ed3aba2477bad42c9eb01913c6b5341ff8ce431c..7c45bee86fc82ca40c259f929f36b3659bbc5bd0 100644 (file)
@@ -4,7 +4,7 @@ ManualPaintModel::ManualPaintModel() {
        _tool = 0; // 0 pencil         ,   1 fill
        _brushfilter = new BrushFilter();
        _fillfilter = new FillFilter();
-       //_imageUndoRedo = new ImageUndoRedo();
+       _imageUndoRedo = new ImageUndoRedo();
 }
 
 //---------------------------------------------------------------------------
@@ -40,7 +40,7 @@ void ManualPaintModel::Set2D3D(int dim2D3D) {
 void ManualPaintModel::SetImage(vtkImageData *image) {
        _brushfilter->SetImage(image);
        _fillfilter->SetImage(image);
-       //_imageUndoRedo->SetImage(image);
+       _imageUndoRedo->SetImage(image);
 }
 
 //---------------------------------------------------------------------------
@@ -92,7 +92,7 @@ void ManualPaintModel::GetScalarRange(double * range) {
 }
 //---------------------------------------------------------------------------
 void ManualPaintModel::SetUndoImage() {
-       /*ImageMManager* imMManager = NULL;
+       ImageMManager* imMManager = NULL;
         if (_tool == 0) {
         imMManager = this->_brushfilter->GetImageMManager();
         }
@@ -101,14 +101,14 @@ void ManualPaintModel::SetUndoImage() {
         }
         this->_imageUndoRedo->SetURImages(imMManager);
         this->_brushfilter->CleanImageMManager();
-        this->_fillfilter->CleanImageMManager();*/
+        this->_fillfilter->CleanImageMManager();
 }
 //---------------------------------------------------------------------------
 
 void ManualPaintModel::Undo() {
-       //this->_imageUndoRedo->Undo();
+       this->_imageUndoRedo->Undo();
 }
 
 void ManualPaintModel::Redo() {
-       //this->_imageUndoRedo->Redo();
+       this->_imageUndoRedo->Redo();
 }