From d432919237a6ed22798851a112e8c49e5086b9ed Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Sun, 18 Apr 2010 22:46:02 +0000 Subject: - Add a new couldCommitCurrentViewActions method to TableDocument, and standardise current view-commit-checks to use that - Add checking of that status to history navigation (fixing http://spbug.com/l/127 ) and window closing (fixing http://spbug.com/lr/263 ) - Improve thread safety/deferred actions in TableContent --- Source/SPHistoryController.m | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Source/SPHistoryController.m') diff --git a/Source/SPHistoryController.m b/Source/SPHistoryController.m index dcef796c..567ebd7a 100644 --- a/Source/SPHistoryController.m +++ b/Source/SPHistoryController.m @@ -145,6 +145,9 @@ - (IBAction) historyControlClicked:(NSSegmentedControl *)theControl { + // Ensure history navigation is permitted - trigger end editing and any required saves + if (![theDocument couldCommitCurrentViewActions]) return; + switch ([theControl selectedSegment]) { // Back button clicked: -- cgit v1.2.3