Reset undo/redo menu item titles

The undo manager will change the titles (e.g. “Undo Rename”) when it’s first responder, so we need to change them back, when the text view is first responder.
This commit is contained in:
Allan Odgaard
2013-02-11 14:21:21 +01:00
parent 2acecd66f3
commit 8fb95309c1

View File

@@ -1914,9 +1914,15 @@ static void update_menu_key_equivalents (NSMenu* menu, action_to_key_t const& ac
}
}
else if([aMenuItem action] == @selector(undo:))
{
[aMenuItem setTitle:@"Undo"];
return document->undo_manager().can_undo();
}
else if([aMenuItem action] == @selector(redo:))
{
[aMenuItem setTitle:@"Redo"];
return document->undo_manager().can_redo();
}
return YES;
}