Minor changes, fixed a possible leak in Uninstall()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16773 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
3417ac5629
commit
deab92e7ed
@ -625,8 +625,7 @@ BMenuItem::Uninstall()
|
||||
if (Target() == fWindow)
|
||||
SetTarget(BMessenger());
|
||||
|
||||
// TODO: I'm not sure about B_COMMAND_KEY
|
||||
if (fShortcutChar != 0 && (fModifiers & B_COMMAND_KEY) && fWindow != NULL)
|
||||
if (fShortcutChar != 0 && fModifiers != 0 && fWindow != NULL)
|
||||
fWindow->RemoveShortcut(fShortcutChar, fModifiers);
|
||||
|
||||
fWindow = NULL;
|
||||
@ -652,10 +651,7 @@ BMenuItem::Select(bool selected)
|
||||
if (fSelected == selected)
|
||||
return;
|
||||
|
||||
if (Submenu()) {
|
||||
fSelected = selected;
|
||||
Highlight(selected);
|
||||
} else if (IsEnabled()) {
|
||||
if (Submenu() || IsEnabled()) {
|
||||
fSelected = selected;
|
||||
Highlight(selected);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user