aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TablesList.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-11-21 22:18:27 +0000
committerrowanbeentje <rowan@beent.je>2009-11-21 22:18:27 +0000
commit7ead84b0868975752f445d1917bc693a5bf502b7 (patch)
tree8bb28e0a7b5482fc13276bc192e738d6e9761b8b /Source/TablesList.m
parentf184235a7f7996e68f4f6548ec8932b289e3d3c1 (diff)
downloadsequelpro-7ead84b0868975752f445d1917bc693a5bf502b7.tar.gz
sequelpro-7ead84b0868975752f445d1917bc693a5bf502b7.tar.bz2
sequelpro-7ead84b0868975752f445d1917bc693a5bf502b7.zip
- Relocate the table changed notification, allowing table info pane to update early in the change process, but ensure the change notification occurs on the main thread for stability. Added NSNotificationAdditions from the Colloquy project for this.
- Change the design of the progress indicator layer, and tweak task progress for improved feedback and less flickering by correctly updating interface as appropriate, and delaying status changes for a short time. This partially addresses Issue #455.
Diffstat (limited to 'Source/TablesList.m')
-rw-r--r--Source/TablesList.m12
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/TablesList.m b/Source/TablesList.m
index f37be72e..eabf062f 100644
--- a/Source/TablesList.m
+++ b/Source/TablesList.m
@@ -35,6 +35,7 @@
#import "RegexKitLite.h"
#import "SPDatabaseData.h"
#import "NSMutableArray-MultipleSort.h"
+#import "NSNotificationAdditions.h"
#import "SPConstants.h"
@interface TablesList (PrivateAPI)
@@ -738,6 +739,14 @@
// Reset the table information caches
[tableDataInstance resetAllData];
+ if (selectedTableType == SP_TABLETYPE_TABLE) {
+ [tableDataInstance updateInformationForCurrentTable];
+ } else if (selectedTableType == SP_TABLETYPE_VIEW) {
+ [tableDataInstance updateInformationForCurrentView];
+ }
+
+ // Notify listeners of the table change now that the state is fully set up.
+ [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadWithName:SPTableChangedNotification object:tableDocumentInstance];
[separatorTableMenuItem setHidden:NO];
[separatorTableContextMenuItem setHidden:NO];
@@ -921,9 +930,6 @@
// Add a history entry
[spHistoryControllerInstance updateHistoryEntries];
-
- // Notify listeners of the table change now that the state is fully set up
- [[NSNotificationCenter defaultCenter] postNotificationName:SPTableChangedNotification object:tableDocumentInstance];
// Empty the loading pool and exit the thread
[tableDocumentInstance endTask];