From 03a3560910ec5d18d662706f8dc6c94c15f326b9 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Thu, 15 Apr 2010 01:33:32 +0000 Subject: - Tweak the history controller to track the toolbar item visibility, and only update it when visible - this fixes crashes after the toolbar item is removed from the toolbar and then updated (eg http://spbug.com/l/114 ) --- Source/TableDocument.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Source/TableDocument.m') diff --git a/Source/TableDocument.m b/Source/TableDocument.m index b0465c0b..2e2d045d 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -1220,7 +1220,6 @@ [taskCancelButton setHidden:YES]; // Set flags and prevent further UI interaction in this window - [historyControl setEnabled:NO]; databaseListIsSelectable = NO; [[NSNotificationCenter defaultCenter] postNotificationName:SPDocumentTaskStartNotification object:self]; [mainToolbar validateVisibleItems]; @@ -1336,7 +1335,6 @@ [taskProgressIndicator setIndeterminate:YES]; // Re-enable window interface - [historyControl setEnabled:YES]; databaseListIsSelectable = YES; [[NSNotificationCenter defaultCenter] postNotificationName:SPDocumentTaskEndNotification object:self]; [mainToolbar validateVisibleItems]; @@ -3437,6 +3435,9 @@ // update the toolbar item size [self updateChooseDatabaseToolbarItemWidth]; + + // The history controller needs to track toolbar item state - trigger setup. + [spHistoryControllerInstance setupInterface]; } /** -- cgit v1.2.3