Skip to content

Commit

Permalink
Fixed an issue with an incorrect external tool identification when tr…
Browse files Browse the repository at this point in the history
…iggered from a toolbar. Fixed #503.
  • Loading branch information
mikekazakov committed Jan 8, 2025
1 parent 81480ba commit 25d6f08
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ - (id)representedObject
- (IBAction)onExternalToolAction:(id)sender
{
if( auto i = nc::objc_cast<NSToolbarItem>(sender) )
if( auto tool = m_Storage->GetTool(i.tag) ) {
if( auto tool = [self findToolWithIdentifier:i.itemIdentifier] ) {
m_RepresentedObject = [[AnyHolder alloc] initWithAny:std::any{tool}];
[NSApp sendAction:@selector(onExecuteExternalTool:) to:nil from:self];
m_RepresentedObject = nil;
Expand Down

0 comments on commit 25d6f08

Please sign in to comment.