mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 18:12:58 +00:00
[MSPAINT] Update scroll info on loading file (#5761)
The scroll info was not updated when the file is loading. - Rename CCanvasWindow::Update as CCanvasWindow::updateScrollInfo. - Update scroll info on ImageModel::NotifyImageChanged. - Improve ImageModel::ClearHistory. CORE-19094
This commit is contained in:
parent
3579ea7888
commit
1a90009bb9
4 changed files with 26 additions and 7 deletions
|
@ -15,9 +15,13 @@ ImageModel imageModel;
|
|||
void ImageModel::NotifyImageChanged()
|
||||
{
|
||||
if (canvasWindow.IsWindow())
|
||||
canvasWindow.Invalidate(FALSE);
|
||||
{
|
||||
canvasWindow.updateScrollInfo();
|
||||
canvasWindow.Invalidate();
|
||||
}
|
||||
|
||||
if (miniature.IsWindow())
|
||||
miniature.Invalidate(FALSE);
|
||||
miniature.Invalidate();
|
||||
}
|
||||
|
||||
ImageModel::ImageModel()
|
||||
|
@ -99,6 +103,15 @@ void ImageModel::ResetToPrevious()
|
|||
|
||||
void ImageModel::ClearHistory()
|
||||
{
|
||||
for (int i = 0; i < HISTORYSIZE; ++i)
|
||||
{
|
||||
if (m_hBms[i] && i != m_currInd)
|
||||
{
|
||||
::DeleteObject(m_hBms[i]);
|
||||
m_hBms[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
m_undoSteps = 0;
|
||||
m_redoSteps = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue