]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/ManualPaintModel.cpp
DFCH: imageUndoRedo + Manual Paint: It doesn't works :s :s
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / manualPaint / ManualPaintModel.cpp
index 6414f887227c789aa2de213d1f1a6abd6ddb9c0a..ed3aba2477bad42c9eb01913c6b5341ff8ce431c 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,23 +92,23 @@ void ManualPaintModel::GetScalarRange(double * range) {
 }
 //---------------------------------------------------------------------------
 void ManualPaintModel::SetUndoImage() {
-       ImageMManager* imMManager = NULL;
-       if (_tool == 0) {
-               imMManager = this->_brushfilter->GetImageMManager();
-       }
-       if (_tool == 1) {
-               imMManager = this->_fillfilter->GetImageMManager();
-       }
-       this->_imageUndoRedo->SetUndoImage(imMManager);
-       this->_brushfilter->CleanImageMManager();
-       this->_fillfilter->CleanImageMManager();
+       /*ImageMManager* imMManager = NULL;
+        if (_tool == 0) {
+        imMManager = this->_brushfilter->GetImageMManager();
+        }
+        if (_tool == 1) {
+        imMManager = this->_fillfilter->GetImageMManager();
+        }
+        this->_imageUndoRedo->SetURImages(imMManager);
+        this->_brushfilter->CleanImageMManager();
+        this->_fillfilter->CleanImageMManager();*/
 }
 //---------------------------------------------------------------------------
 
 void ManualPaintModel::Undo() {
-       this->_imageUndoRedo->Undo();
+       //this->_imageUndoRedo->Undo();
 }
 
 void ManualPaintModel::Redo() {
-       this->_imageUndoRedo->Redo();
+       //this->_imageUndoRedo->Redo();
 }