history.cpp (72081168) history.cpp (1aeebfda)
1/*
2 * PROJECT: PAINT for ReactOS
3 * LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later)
4 * PURPOSE: Undo and redo functionality
5 * COPYRIGHT: Copyright 2015 Benedikt Freisen <b.freisen@gmx.net>
6 * Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
7 */
8

--- 340 unchanged lines hidden (view full) ---

349void ImageModel::UnlockBitmap(HBITMAP hbmLocked)
350{
351 m_hbmMaster = hbmLocked;
352 m_hbmOld = ::SelectObject(m_hDrawingDC, m_hbmMaster); // Re-select
353}
354
355void ImageModel::SelectionClone(BOOL bUndoable)
356{
1/*
2 * PROJECT: PAINT for ReactOS
3 * LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later)
4 * PURPOSE: Undo and redo functionality
5 * COPYRIGHT: Copyright 2015 Benedikt Freisen <b.freisen@gmx.net>
6 * Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
7 */
8

--- 340 unchanged lines hidden (view full) ---

349void ImageModel::UnlockBitmap(HBITMAP hbmLocked)
350{
351 m_hbmMaster = hbmLocked;
352 m_hbmOld = ::SelectObject(m_hDrawingDC, m_hbmMaster); // Re-select
353}
354
355void ImageModel::SelectionClone(BOOL bUndoable)
356{
357 if (!selectionModel.m_bShow || ::IsRectEmpty(&selectionModel.m_rc))
357 if (!selectionModel.m_bShow || selectionModel.m_rc.IsRectEmpty())
358 return;
359
360 if (bUndoable)
361 PushImageForUndo();
362
363 selectionModel.DrawSelection(m_hDrawingDC, paletteModel.GetBgColor(),
364 toolsModel.IsBackgroundTransparent());
365 NotifyImageChanged();
366}
358 return;
359
360 if (bUndoable)
361 PushImageForUndo();
362
363 selectionModel.DrawSelection(m_hDrawingDC, paletteModel.GetBgColor(),
364 toolsModel.IsBackgroundTransparent());
365 NotifyImageChanged();
366}