Accepts drops on legends.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25030 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol 2008-04-18 17:30:00 +00:00
parent 79cbd22649
commit 5f2f72a288
1 changed files with 11 additions and 1 deletions

View File

@ -744,7 +744,17 @@ ActivityView::MessageReceived(BMessage* message)
fBackgroundColor = *color;
_UpdateOffscreenBitmap(true);
} else {
// XXX: check each legend color box ?
// check each legend color box
BRect legendFrame = _LegendFrame();
int32 i;
for (i = 0; i < fSources.CountItems(); i++) {
BRect r = _LegendFrameAt(legendFrame, i);
if (r.Contains(dropPoint)) {
fSources.ItemAt(i)->SetColor(*color);
return;
}
}
// background
SetLowColor(*color);
}
return;