diff --git a/src/apps/showimage/ShowImageView.cpp b/src/apps/showimage/ShowImageView.cpp index d43e647032..f73b6453a8 100644 --- a/src/apps/showimage/ShowImageView.cpp +++ b/src/apps/showimage/ShowImageView.cpp @@ -2014,7 +2014,7 @@ ShowImageView::_AddWhiteRect(BRect &rect) void -ShowImageView::_RemoveSelection(bool toClipboard) +ShowImageView::_RemoveSelection(bool toClipboard, bool neverCutBackground) { if (!_HasSelection()) return; @@ -2029,7 +2029,7 @@ ShowImageView::_RemoveSelection(bool toClipboard) _SetHasSelection(false); - if (cutBackground) { + if (!neverCutBackground && cutBackground) { // If the user hasn't dragged the selection, // paint a white rectangle where the selection was restore = _CopyFromRect(rect); @@ -2111,7 +2111,8 @@ ShowImageView::ClearSelection() { // Remove the selection, // DON'T copy it to the clipboard - _RemoveSelection(false); + // or white out the selection + _RemoveSelection(false, true); } diff --git a/src/apps/showimage/ShowImageView.h b/src/apps/showimage/ShowImageView.h index 5a1488d084..54ed2778c5 100644 --- a/src/apps/showimage/ShowImageView.h +++ b/src/apps/showimage/ShowImageView.h @@ -132,7 +132,7 @@ class ShowImageView : public BView { }; void _InitPatterns(); void _RotatePatterns(); - void _RemoveSelection(bool bToClipboard); + void _RemoveSelection(bool bToClipboard, bool neverCutBackground = false); bool _HasSelection() { return fHasSelection; } void _SetHasSelection(bool bHasSelection); void _AnimateSelection(bool a);