[MSPAINT] Reset scroll position in some situations (#5789)

In some situations, the scroll position should be reset.
- Add CCanvasWindow::resetScrollPos method.
- Reset the scroll position on loading a file.
- Reset the scroll position on mirroring/rotating
  the image.
CORE-19094
This commit is contained in:
Katayama Hirofumi MZ 2023-10-12 22:59:17 +09:00 committed by GitHub
parent 9a51c8e6c6
commit 1183e797b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 0 deletions

View file

@ -241,6 +241,7 @@ HBITMAP InitializeImage(LPCWSTR name, LPWIN32_FIND_DATAW pFound, BOOL isFile)
HBITMAP SetBitmapAndInfo(HBITMAP hBitmap, LPCWSTR name, LPWIN32_FIND_DATAW pFound, BOOL isFile)
{
// update image
canvasWindow.resetScrollPos();
imageModel.PushImageForUndo(hBitmap);
imageModel.ClearHistory();