* Fixed #3042 as suggested by Stippi (looks like I'm quickly following Ingo's

great example at getting senile - at least he told me about this solution
  before; the same trick is already used in SetZoom()).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39527 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2010-11-19 21:57:31 +00:00
parent a9e89a7325
commit d0405baf86

View File

@ -376,8 +376,7 @@ ShowImageView::SetImage(const entry_ref* ref, BBitmap* bitmap)
// prepare the display bitmap
if (fBitmap->ColorSpace() == B_RGBA32)
fDisplayBitmap = compose_checker_background(fBitmap);
if (!fDisplayBitmap)
if (fDisplayBitmap == NULL)
fDisplayBitmap = fBitmap;
BNode node(ref);
@ -1210,23 +1209,12 @@ ShowImageView::_ScrollRestricted(float x, float y, bool absolute)
if (y != 0)
y = _LimitToRange(y, B_VERTICAL, absolute);
// hide the caption when using mouse wheel
// in full screen mode
// to prevent the caption from dirtying up the image
// during scrolling.
bool caption = fShowCaption;
if (caption) {
fShowCaption = false;
_UpdateCaption();
}
// We invalidate before we scroll to avoid the caption messing up the
// image, and to prevent it from flickering
if (fShowCaption)
Invalidate();
ScrollBy(x, y);
if (caption) {
// show the caption again
fShowCaption = true;
_UpdateCaption();
}
}