mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-19 14:55:01 +00:00
Fixed: a disabled CPMenuItem could still have a selected background
Previously it was possible to have a highlighted CPMenuItem for a disabled CPMenuItem. (To get that, select an item, close the menu, disabled the item manually and then open the menu again). Now it is not possible to get this behavior.
This commit is contained in:
1 parent
1e7dd0dc59
commit
ec4b348369
1 file changed
+3
@@ -166,6 +166,9 @@ var CPMenuItemStringRepresentationDictionary = @{
|
||||
if (_isEnabled === isEnabled)
|
||||
return;
|
||||
|
||||
if (!isEnabled && [self isHighlighted])
|
||||
[_menu _highlightItemAtIndex:CPNotFound];
|
||||
|
||||
_isEnabled = !!isEnabled;
|
||||
|
||||
[_menuItemView setDirty];
|
||||
|
||||
Reference in new issue
Block a user