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:
@@ -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);
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user