mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 02:43:09 +00:00
[MSPAINT] Refactor ImageModel (#5335)
- Unify ImageModel::Insert and ImageModel::CopyPrevious to ImageModel::PushImageForUndo. - Delete useless stuffs. - Fix some memory leaks. - Fix IDM_IMAGECROP. CORE-17969, CORE-18867
This commit is contained in:
parent
70f897e4c9
commit
2b623c1d04
8 changed files with 144 additions and 183 deletions
|
@ -194,7 +194,7 @@ void SelectionModel::Landing()
|
|||
ClearMask();
|
||||
ClearColor();
|
||||
|
||||
imageModel.CopyPrevious();
|
||||
imageModel.PushImageForUndo();
|
||||
}
|
||||
|
||||
void SelectionModel::InsertFromHBITMAP(HBITMAP hBm, INT x, INT y)
|
||||
|
@ -445,7 +445,7 @@ void SelectionModel::CancelSelection()
|
|||
if (!m_bShow)
|
||||
return;
|
||||
|
||||
imageModel.CopyPrevious();
|
||||
imageModel.PushImageForUndo();
|
||||
if (m_bShow)
|
||||
imageModel.Undo(TRUE);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue