Disable the Invert menu item for B_CMAP8 bitmaps because they are currently unsupported by the invert algorithm.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5721 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Matthew Wilber
2003-12-22 01:56:27 +00:00
parent 9f54b9718e
commit 16b663b7ab
2 changed files with 8 additions and 0 deletions
+1
View File
@@ -255,6 +255,7 @@ ShowImageView::Notify(const char* status)
if (status != NULL) {
msg.AddString("status", status);
}
msg.AddInt32("colors", fBitmap->ColorSpace());
BMessenger msgr(Window());
msgr.SendMessage(&msg);
+7
View File
@@ -545,6 +545,13 @@ ShowImageWindow::MessageReceived(BMessage *pmsg)
pcurItem->SetMarked(true);
}
}
// Disable the Invert menu item if the bitmap color space
// is B_CMAP8. (B_CMAP8 is currently unsupported by the
// invert algorithm)
color_space colors = B_NO_COLOR_SPACE;
pmsg->FindInt32("colors", reinterpret_cast<int32 *>(&colors));
EnableMenuItem(fBar, MSG_INVERT, (colors != B_CMAP8));
BString str;
if (pmsg->FindString("status", &str) == B_OK)