mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 05:13:08 +00:00
[MSPAINT] Improve behaviour on memory shortage (#7780)
Improve UX on memory shortage. JIRA issue: CORE-20020 - Clear history on memory shortage. - Improve CCanvasWindow::OnPaint on memory shortage. - Add null check in CCanvasWindow::DoDraw. - Retire using of cache in CCanvasWindow.
This commit is contained in:
parent
c930c8c464
commit
9563c07146
5 changed files with 47 additions and 18 deletions
|
@ -130,6 +130,7 @@ void ImageModel::PushImageForUndo()
|
|||
if (hbm == NULL)
|
||||
{
|
||||
ShowOutOfMemory();
|
||||
ClearHistory();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -143,6 +144,7 @@ void ImageModel::PushImageForUndo(HBITMAP hbm)
|
|||
if (hbm == NULL)
|
||||
{
|
||||
ShowOutOfMemory();
|
||||
ClearHistory();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -201,6 +203,7 @@ void ImageModel::Crop(int nWidth, int nHeight, int nOffsetX, int nOffsetY)
|
|||
if (!hbmNew)
|
||||
{
|
||||
ShowOutOfMemory();
|
||||
ClearHistory();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue