[MSPAINT] Improve GetSelectionContents for free-shape selection (#6554)

Follow-up to #6552. There was
a bug that the cropped selection
image is not the shape of selection.
JIRA issue: CORE-19466
- Extend SelectionModel::
  DrawSelection for drawing
  selection flexibly.
- Improve SelectionModel::
  GetSelectionContents method.
This commit is contained in:
Katayama Hirofumi MZ 2024-02-28 22:01:08 +09:00 committed by GitHub
parent f0e45f07e1
commit e928b42758
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 34 additions and 11 deletions

View file

@ -1056,8 +1056,8 @@ LRESULT CMainWindow::OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bH
HBITMAP hbmSelection = selectionModel.GetSelectionContents();
if (hbmSelection)
{
selectionModel.HideSelection();
imageModel.PushImageForUndo(hbmSelection);
selectionModel.HideSelection();
imageModel.NotifyImageChanged();
}
break;