aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPFieldEditorController.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-04-29 10:08:52 +0000
committerstuconnolly <stuart02@gmail.com>2012-04-29 10:08:52 +0000
commitfb3b03a7d96870cc3829a8c1d01b37267866e8e7 (patch)
tree6ec3239fcdf8085273c53359e0a6ea58ed421706 /Source/SPFieldEditorController.m
parent4cad6f0e6e4fb497b480256c2abe3de34ebf225c (diff)
downloadsequelpro-fb3b03a7d96870cc3829a8c1d01b37267866e8e7.tar.gz
sequelpro-fb3b03a7d96870cc3829a8c1d01b37267866e8e7.tar.bz2
sequelpro-fb3b03a7d96870cc3829a8c1d01b37267866e8e7.zip
Bring outline view branch up to date with trunk (r3586:r3592).
Diffstat (limited to 'Source/SPFieldEditorController.m')
-rw-r--r--Source/SPFieldEditorController.m17
1 files changed, 5 insertions, 12 deletions
diff --git a/Source/SPFieldEditorController.m b/Source/SPFieldEditorController.m
index 3a4ee14c..f94af537 100644
--- a/Source/SPFieldEditorController.m
+++ b/Source/SPFieldEditorController.m
@@ -32,6 +32,7 @@
#import "SPTooltip.h"
#import "SPGeometryDataView.h"
#import "SPCopyTable.h"
+#import "SPWindow.h"
#include <objc/objc-runtime.h>
#import "SPCustomQuery.h"
#import "SPTableContent.h"
@@ -85,6 +86,10 @@
// Allow the user to enter cmd+return to close the edit sheet in addition to fn+return
[editSheetOkButton setKeyEquivalentModifierMask:NSCommandKeyMask];
+ // Permit the field edit sheet to become main if necessary; this allows fields within the sheet to
+ // support full interactivity, for example use of the NSFindPanel inside NSTextViews.
+ [editSheet setIsSheetWhichCanBecomeMain:YES];
+
allowUndo = NO;
selectionChanged = NO;
@@ -431,19 +436,7 @@
editSheetWillBeInitialized = NO;
[editSheetProgressBar stopAnimation:self];
-
- // The field editor sheet runs as sheet thus a NSTextView won't respond to the Find Panel
- // since the Find Panel validate its buttons against [[NSApp mainWindow] firstResponder] == NSTextView.
- // After ordering out this sheet SPCopyTable remains the first responder thus set it hard.
- // This only works in conjunction with [NSTextView becomeFirstResponder] and [NSTextView resignFirstResponder]
- // which has to return YES.
-#ifndef SP_REFACTOR
- if([[self window] firstResponder] == editTextView)
- [[NSApp mainWindow] makeFirstResponder:[[self window] firstResponder]];
-#endif
-
}
-
}
/**