git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28411 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2008-10-31 19:25:42 +00:00
parent d9e3b747bf
commit f2a5c5714d

View File

@ -291,19 +291,19 @@ ObjectView::Pulse()
void
ObjectView::MessageReceived(BMessage* msg)
{
BMenuItem* item = NULL;
BMenuItem* item = NULL;
bool toggleItem = false;
switch (msg->what) {
case kMsgFPS:
fFps = (fFps) ? false : true;
case kMsgFPS:
fFps = (fFps) ? false : true;
msg->FindPointer("source", reinterpret_cast<void**>(&item));
item->SetMarked(fFps);
fForceRedraw = true;
setEvent(drawEvent);
break;
case kMsgAddModel:
fObjListLock.Lock();
case kMsgAddModel:
fObjListLock.Lock();
fObjects.AddItem(new TriangleObject(this, teapotPath));
fObjListLock.Unlock();
setEvent(drawEvent);
@ -365,12 +365,12 @@ ObjectView::MessageReceived(BMessage* msg)
case kMsgFog:
fFog = !fFog;
toggleItem = true;
break;
break;
}
if (toggleItem && msg->FindPointer("source", reinterpret_cast<void**>(&item)) == B_OK){
if (toggleItem && msg->FindPointer("source", reinterpret_cast<void**>(&item)) == B_OK){
item->SetMarked(!item->IsMarked());
setEvent(drawEvent);
setEvent(drawEvent);
}
BGLView::MessageReceived(msg);