diff options
author | stuconnolly <stuart02@gmail.com> | 2011-03-08 20:41:11 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2011-03-08 20:41:11 +0000 |
commit | 4a950f357fb29640b2732ca34c80f81c0b23fbe6 (patch) | |
tree | 8dab179aa98c223a9791889846032c0e960636b4 /Source/SPTableContent.m | |
parent | 2baa01621f83df3c81e6b6ed2310d483962dcf48 (diff) | |
download | sequelpro-4a950f357fb29640b2732ca34c80f81c0b23fbe6.tar.gz sequelpro-4a950f357fb29640b2732ca34c80f81c0b23fbe6.tar.bz2 sequelpro-4a950f357fb29640b2732ca34c80f81c0b23fbe6.zip |
Bring outline view branch up to date with trunk (r3227:r3233).
Diffstat (limited to 'Source/SPTableContent.m')
-rw-r--r-- | Source/SPTableContent.m | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index 5f5de871..c4eb9f57 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -2645,8 +2645,11 @@ return YES; } - // Save any edits which have been made but not saved to the table yet. - [[tableDocumentInstance parentWindow] endEditingFor:nil]; + // Save any edits which have been made but not saved to the table yet; + // but not for any NSSearchFields which could cause a crash for undo, redo. + if([[[tableDocumentInstance parentWindow] firstResponder] respondsToSelector:@selector(delegate)] + && ![[[[tableDocumentInstance parentWindow] firstResponder] delegate] isKindOfClass:[NSSearchField class]]) + [[tableDocumentInstance parentWindow] endEditingFor:nil]; // If no rows are currently being edited, or a save is in progress, return success at once. if (!isEditingRow || isSavingRow) return YES; |