Previously misunderstood what fMovesBitmap means, renamed _MoveBitmap() also

so these two match up again and refer scrolling.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37160 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2010-06-16 21:52:27 +00:00
parent 4fa7e62e8d
commit a7b525d735
2 changed files with 11 additions and 11 deletions
+9 -9
View File
@@ -206,7 +206,7 @@ ShowImageView::ShowImageView(BRect rect, const char *name, uint32 resizingMode,
fZoomToBounds(false), fZoomToBounds(false),
fShrinkOrZoomToBounds(false), fShrinkOrZoomToBounds(false),
fFullScreen(false), fFullScreen(false),
fDraggingBitmap(false), fScrollingBitmap(false),
fCreatingSelection(false), fCreatingSelection(false),
fFirstPoint(0.0, 0.0), fFirstPoint(0.0, 0.0),
fAnimateSelection(true), fAnimateSelection(true),
@@ -1370,7 +1370,7 @@ ShowImageView::_HandleDrop(BMessage* msg)
void void
ShowImageView::_MoveImage() ShowImageView::_ScrollBitmap()
{ {
BPoint point, delta; BPoint point, delta;
uint32 buttons; uint32 buttons;
@@ -1383,7 +1383,7 @@ ShowImageView::_MoveImage()
// in case we miss MouseUp // in case we miss MouseUp
if ((_GetMouseButtons() & B_TERTIARY_MOUSE_BUTTON) == 0) if ((_GetMouseButtons() & B_TERTIARY_MOUSE_BUTTON) == 0)
fDraggingBitmap = false; fScrollingBitmap = false;
} }
@@ -1550,7 +1550,7 @@ ShowImageView::MouseDown(BPoint position)
} else if (buttons == B_TERTIARY_MOUSE_BUTTON) { } else if (buttons == B_TERTIARY_MOUSE_BUTTON) {
// move image in window // move image in window
SetMouseEventMask(B_POINTER_EVENTS); SetMouseEventMask(B_POINTER_EVENTS);
fDraggingBitmap = true; fScrollingBitmap = true;
fFirstPoint = ConvertToScreen(position); fFirstPoint = ConvertToScreen(position);
} }
} }
@@ -1591,8 +1591,8 @@ ShowImageView::MouseMoved(BPoint point, uint32 state, const BMessage *message)
fHideCursorCountDown = HIDE_CURSOR_DELAY_TIME; fHideCursorCountDown = HIDE_CURSOR_DELAY_TIME;
if (fCreatingSelection) { if (fCreatingSelection) {
_UpdateSelectionRect(point, false); _UpdateSelectionRect(point, false);
} else if (fDraggingBitmap) { } else if (fScrollingBitmap) {
_MoveImage(); _ScrollBitmap();
} }
} }
@@ -1603,9 +1603,9 @@ ShowImageView::MouseUp(BPoint point)
if (fCreatingSelection) { if (fCreatingSelection) {
_UpdateSelectionRect(point, true); _UpdateSelectionRect(point, true);
fCreatingSelection = false; fCreatingSelection = false;
} else if (fDraggingBitmap) { } else if (fScrollingBitmap) {
_MoveImage(); _ScrollBitmap();
fDraggingBitmap = false; fScrollingBitmap = false;
} }
_AnimateSelection(true); _AnimateSelection(true);
} }
+2 -2
View File
@@ -210,7 +210,7 @@ private:
const char* type, const char* type,
translation_format* format); translation_format* format);
void _HandleDrop(BMessage* message); void _HandleDrop(BMessage* message);
void _MoveImage(); void _ScrollBitmap();
uint32 _GetMouseButtons(); uint32 _GetMouseButtons();
void _UpdateSelectionRect(BPoint point, bool final); void _UpdateSelectionRect(BPoint point, bool final);
void _DrawBorder(BRect border); void _DrawBorder(BRect border);
@@ -266,7 +266,7 @@ private:
bool fZoomToBounds; bool fZoomToBounds;
bool fShrinkOrZoomToBounds; bool fShrinkOrZoomToBounds;
bool fFullScreen; bool fFullScreen;
bool fDraggingBitmap; bool fScrollingBitmap;
bool fCreatingSelection; bool fCreatingSelection;
BPoint fFirstPoint; BPoint fFirstPoint;
// first point in image space of selection // first point in image space of selection