Mouse won't crash anymore if it can't find its bitmaps.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15431 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
78d0941945
commit
7042f1dd6e
@ -186,16 +186,24 @@ SettingsView::Draw(BRect updateFrame)
|
|||||||
SetDrawingMode(B_OP_OVER);
|
SetDrawingMode(B_OP_OVER);
|
||||||
|
|
||||||
// Draw the icons
|
// Draw the icons
|
||||||
if (updateFrame.Intersects( // i have to add 10 pixels width and height, so weird
|
BPoint doubleClickBmpPoint(344, 16);
|
||||||
BRect(333, 16, 354 + fDoubleClickBitmap->Bounds().Width(),
|
if (fDoubleClickBitmap != NULL
|
||||||
165 + fAccelerationBitmap->Bounds().Height()))) {
|
&& updateFrame.Intersects(BRect(doubleClickBmpPoint,
|
||||||
if (fDoubleClickBitmap != NULL)
|
doubleClickBmpPoint + fDoubleClickBitmap->Bounds().RightBottom())))
|
||||||
DrawBitmapAsync(fDoubleClickBitmap, BPoint(344, 16));
|
DrawBitmapAsync(fDoubleClickBitmap, doubleClickBmpPoint);
|
||||||
if (fSpeedBitmap != NULL)
|
|
||||||
DrawBitmapAsync(fSpeedBitmap, BPoint(333, 90));
|
BPoint speedBmpPoint(333, 90);
|
||||||
if (fAccelerationBitmap != NULL)
|
if (fSpeedBitmap != NULL
|
||||||
DrawBitmapAsync(fAccelerationBitmap, BPoint(333, 155));
|
&& updateFrame.Intersects(BRect(speedBmpPoint,
|
||||||
}
|
speedBmpPoint + fSpeedBitmap->Bounds().RightBottom())))
|
||||||
|
DrawBitmapAsync(fSpeedBitmap, speedBmpPoint);
|
||||||
|
|
||||||
|
BPoint accelerationBmpPoint(333, 155);
|
||||||
|
if (fAccelerationBitmap != NULL
|
||||||
|
&& updateFrame.Intersects(BRect(accelerationBmpPoint,
|
||||||
|
accelerationBmpPoint + fAccelerationBitmap->Bounds().RightBottom())))
|
||||||
|
DrawBitmapAsync(fAccelerationBitmap, accelerationBmpPoint);
|
||||||
|
|
||||||
|
|
||||||
SetDrawingMode(B_OP_COPY);
|
SetDrawingMode(B_OP_COPY);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user