Make window key in actions that show file browser field editor

It is possible to bring up menus for inactive windows and e.g. select Rename or Duplicate.
This commit is contained in:
Allan Odgaard
2014-09-26 13:09:21 +02:00
parent a983643fb8
commit cb463534b8
2 changed files with 4 additions and 0 deletions

View File

@@ -248,6 +248,7 @@ static NSSet* VisibleItems (NSOutlineView* outlineView, FSItem* root, NSMutableS
if(![pendingEditURL isEqual:[[outlineView itemAtRow:i] url]])
continue;
[[outlineView window] makeKeyWindow];
[outlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:i] byExtendingSelection:NO];
[outlineView editColumn:0 row:i withEvent:nil select:YES];
self.pendingEditURL = nil;

View File

@@ -172,7 +172,10 @@
- (void)performEditSelectedRow:(id)sender
{
if([self numberOfSelectedRows] == 1)
{
[[self window] makeKeyWindow];
[self editColumn:0 row:[self selectedRow] withEvent:nil select:YES];
}
}
- (void)keyDown:(NSEvent*)theEvent