From 85afb9383bda6d8c1fdfe4c04cee1de0933118f7 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Wed, 19 May 2010 22:37:04 +0000 Subject: - Ensure any table changes are applied before switching tables as a result of a right-click. This should address much of Issue #691, and a number of crashes logged since 0.9.8 --- Source/SPTableView.m | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Source') diff --git a/Source/SPTableView.m b/Source/SPTableView.m index e53a38e8..4acf4879 100644 --- a/Source/SPTableView.m +++ b/Source/SPTableView.m @@ -42,6 +42,11 @@ && [[[self window] delegate] isWorking]) return nil; + // Check to see whether any edits-in-progress need to be saved before changing selections + if ([[[[[self window] delegate] class] description] isEqualToString:@"TableDocument"] + && ![[[self window] delegate] couldCommitCurrentViewActions]) + return nil; + // If more than one row is selected only returns the default contextual menu if([self numberOfSelectedRows] > 1) return [self menu]; -- cgit v1.2.3