Use menu item as sender when triggering its action

This is required so that the receiver can ask the menu item (sender) for its tag value.
This commit is contained in:
Allan Odgaard
2014-08-14 16:46:10 +02:00
parent 4a20bfebaa
commit a6eab1afe6

View File

@@ -594,7 +594,7 @@ static std::vector<bundles::item_ptr> relevant_items_in_scope (scope::context_t
{
[self.window orderOut:self];
if(menuItem.action)
[NSApp sendAction:menuItem.action to:menuItem.target from:self];
[NSApp sendAction:menuItem.action to:menuItem.target from:menuItem];
[self.window close];
return;