avoids drawing unknown keys
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17719 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
42f70a5d3d
commit
99e002f375
@ -1099,6 +1099,8 @@ void
|
||||
MapView::DrawKey(uint32 keyCode)
|
||||
{
|
||||
BRect r = fKeysRect[keyCode];
|
||||
if (!r.IsValid())
|
||||
return;
|
||||
SetHighColor(0,0,0);
|
||||
StrokeRect(r);
|
||||
|
||||
@ -1412,7 +1414,7 @@ MapView::MouseDown(BPoint point)
|
||||
if(buttons & B_PRIMARY_MOUSE_BUTTON) {
|
||||
fCurrentMouseKey = 0;
|
||||
for (int32 i=0; i<128; i++) {
|
||||
if (fKeysRect[i].Contains(point)) {
|
||||
if (fKeysRect[i].IsValid() && fKeysRect[i].Contains(point)) {
|
||||
fCurrentMouseKey = i;
|
||||
DrawKey(fCurrentMouseKey);
|
||||
char *str = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user