Fix #5808. I'm not completely happy with this solution, but it fixes the
problem without a bunch of refactoring. I intend to do more refactoring of ShowImage after developing an automated test suite. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36800 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user