aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDatabaseViewController.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/SPDatabaseViewController.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/SPDatabaseViewController.m')
-rw-r--r--Source/SPDatabaseViewController.m18
1 files changed, 12 insertions, 6 deletions
diff --git a/Source/SPDatabaseViewController.m b/Source/SPDatabaseViewController.m
index defc8e26..2f6af2e7 100644
--- a/Source/SPDatabaseViewController.m
+++ b/Source/SPDatabaseViewController.m
@@ -180,9 +180,7 @@
[mainToolbar setSelectedItemIdentifier:SPMainToolbarTableInfo];
[spHistoryControllerInstance updateHistoryEntries];
- // Refresh data
- if([self table] && [[self table] length]) {
- [tableDataInstance resetAllData];
+ if ([[self table] length]) {
[extendedTableInfoInstance loadTable:[self table]];
}
@@ -230,11 +228,15 @@
*/
- (void)setStructureRequiresReload:(BOOL)reload
{
+ BOOL reloadRequired = reload;
+
#ifndef SP_REFACTOR
- if (reload && selectedTableName && [tableTabView indexOfTabViewItem:[tableTabView selectedTabViewItem]] == SPTableViewStructure) {
-#else
- if (reload && selectedTableName ) {
+ if ([tableTabView indexOfTabViewItem:[tableTabView selectedTabViewItem]] == SPTableViewStructure) {
+ reloadRequired = NO;
+ }
#endif
+
+ if (reloadRequired && selectedTableName) {
[tableSourceInstance loadTable:selectedTableName];
} else {
structureLoaded = !reload;
@@ -525,6 +527,10 @@
if (!statusLoaded) [[extendedTableInfoInstance onMainThread] loadTable:nil];
if (!triggersLoaded) [[tableTriggersInstance onMainThread] resetInterface];
+ // If the table row counts an inaccurate and require updating, trigger an update - no
+ // action will be performed if not necessary
+ [tableDataInstance updateAccurateNumberOfRowsForCurrentTableForcingUpdate:NO];
+
#ifndef SP_REFACTOR /* show Create Table syntax */
// Update the "Show Create Syntax" window if it's already opened
// according to the selected table/view/proc/func