Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

UKFilePathView: Simplify window picking to avoid unwanted side effect…

…s of the previous attempt at fixing drawers that didn't work.
  • Loading branch information...
commit e684cd0a18ed6f8d6bbe2dbd0fdc77d3fb4001a1 1 parent d8f29d9
@uliwitness authored
Showing with 4 additions and 13 deletions.
  1. +4 −13 UKFilePathView.m
View
17 UKFilePathView.m
@@ -774,19 +774,10 @@ -(NSMenu*) menuForEvent: (NSEvent*)evt
-(NSWindow*) windowForSheet
{
NSWindow* theWindow = [self window];
- while( theWindow ) // Really repeat TRUE, but this catches the case where we're not in a window yet.
- {
- NSDocument* currDoc = [[NSDocumentController sharedDocumentController] documentForWindow: theWindow];
- if( currDoc )
- {
- theWindow = [currDoc windowForSheet];
- break;
- }
- if( [theWindow parentWindow] )
- theWindow = [theWindow parentWindow];
- else
- break;
- }
+ NSDocument* currDoc = [[NSDocumentController sharedDocumentController] documentForWindow: theWindow];
+ if( currDoc )
+ theWindow = [currDoc windowForSheet];
+
return theWindow;
}

0 comments on commit e684cd0

Please sign in to comment.
Something went wrong with that request. Please try again.