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:
Ryan Leavengood
2010-05-13 04:28:57 +00:00
parent 016233a96c
commit 77982ded19
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -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);
}
+1 -1
View File
@@ -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);