mirror of
https://github.com/reactos/reactos.git
synced 2026-05-31 08:17:09 +08:00
[MSPAINT] Fix PushImageForUndo (follow-up of 7c0615f)
CORE-19226, CORE-19237
This commit is contained in:
@@ -130,11 +130,10 @@ void ImageModel::PushImageForUndo(HBITMAP hbm)
|
||||
return;
|
||||
}
|
||||
|
||||
INT iNextItem = (m_currInd + 1) % HISTORYSIZE;
|
||||
::DeleteObject(m_hBms[iNextItem]);
|
||||
::DeleteObject(m_hBms[m_currInd]);
|
||||
m_hBms[m_currInd] = m_hbmMaster;
|
||||
m_hbmMaster = hbm;
|
||||
m_currInd = iNextItem;
|
||||
m_currInd = (m_currInd + 1) % HISTORYSIZE; // Go next
|
||||
::SelectObject(m_hDrawingDC, m_hbmMaster); // Re-select
|
||||
|
||||
if (m_undoSteps < HISTORYSIZE - 1)
|
||||
|
||||
Reference in New Issue
Block a user