aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPExtendedTableInfo.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2013-01-21 00:51:01 +0000
committerrowanbeentje <rowan@beent.je>2013-01-21 00:51:01 +0000
commitfb74197b3affc05405439458d01e2f45eec47816 (patch)
treec0963a1b3aeed9d01b27e058e396670fd4c97f62 /Source/SPExtendedTableInfo.m
parenta192312d3060c37c9451ac05e1a939293db5b941 (diff)
downloadsequelpro-fb74197b3affc05405439458d01e2f45eec47816.tar.gz
sequelpro-fb74197b3affc05405439458d01e2f45eec47816.tar.bz2
sequelpro-fb74197b3affc05405439458d01e2f45eec47816.zip
- Fix a problem where the row count for InnoDB would not be displayed as an accurate value, whatever the Preferences setting, if the Content table was not selected
- Clean up code slightly - Remove an unneccessary query being used for the table information view, speeding up display slightly
Diffstat (limited to 'Source/SPExtendedTableInfo.m')
-rw-r--r--Source/SPExtendedTableInfo.m13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/SPExtendedTableInfo.m b/Source/SPExtendedTableInfo.m
index edb3fd23..6f4f9ae8 100644
--- a/Source/SPExtendedTableInfo.m
+++ b/Source/SPExtendedTableInfo.m
@@ -49,6 +49,7 @@ static NSString *SPUpdateTableTypeNewType = @"SPUpdateTableTypeNewType";
@interface SPExtendedTableInfo ()
+- (void)_updateDisplayedInfo:(NSNotification *)aNotification;
- (void)_changeCurrentTableTypeFrom:(NSString *)currentType to:(NSString *)newType;
- (NSString *)_formatValueWithKey:(NSString *)key inDictionary:(NSDictionary *)statusDict;
@@ -72,6 +73,10 @@ static NSString *SPUpdateTableTypeNewType = @"SPUpdateTableTypeNewType";
selector:@selector(endDocumentTaskForTab:)
name:SPDocumentTaskEndNotification
object:tableDocumentInstance];
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(_updateDisplayedInfo:)
+ name:SPTableInfoChangedNotification
+ object:tableDocumentInstance];
}
#pragma mark -
@@ -617,6 +622,14 @@ static NSString *SPUpdateTableTypeNewType = @"SPUpdateTableTypeNewType";
#pragma mark Private API
/**
+ * Trigger an update to a display in reaction to changes in external data
+ */
+- (void)_updateDisplayedInfo:(NSNotification *)aNotification
+{
+ [self loadTable:selectedTable];
+}
+
+/**
* Changes the current table's storage engine to the supplied type.
*/
- (void)_changeCurrentTableTypeFrom:(NSString *)currentType to:(NSString *)newType