}
//---------------------------------------------------------------------------
void ManualPaintModel::SetUndoImage() {
- RegionStructUR* region = NULL;
- if (_tool == 0) {
- region = this->_brushfilter->GetModifiedRegion();
- }
- if (_tool == 1) {
- region = this->_fillfilter->GetModifiedRegion();
- }
- this->_imageUndoRedo->SetUndoImage((*region));
- this->_brushfilter->CleanModifiedRegion();
- this->_fillfilter->CleanModifiedRegion();
+ 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();
}