aboutsummaryrefslogtreecommitdiffstats
path: root/TableContent.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2008-11-20 14:44:28 +0000
committerrowanbeentje <rowan@beent.je>2008-11-20 14:44:28 +0000
commita1fe720cf5d7b6a04e7fa2b096721bad8a9e4532 (patch)
tree1592273dc20d6edd20dcce7cd4870d1b452e7866 /TableContent.m
parent5f82f03483585a5f947e5fd7313674ecd71699c0 (diff)
downloadsequelpro-a1fe720cf5d7b6a04e7fa2b096721bad8a9e4532.tar.gz
sequelpro-a1fe720cf5d7b6a04e7fa2b096721bad8a9e4532.tar.bz2
sequelpro-a1fe720cf5d7b6a04e7fa2b096721bad8a9e4532.zip
Fix a bug in r200 not showing the rows in the table and a longstanding bug not showing any applied limit on initial table load
Diffstat (limited to 'TableContent.m')
-rw-r--r--TableContent.m10
1 files changed, 6 insertions, 4 deletions
diff --git a/TableContent.m b/TableContent.m
index 65123200..0a98414c 100644
--- a/TableContent.m
+++ b/TableContent.m
@@ -137,6 +137,10 @@
fieldNames = [[queryResult fetchFieldNames] retain];
fieldTypes = [[queryResult fetchTypesAsArray] retain];
+ // Retrieve the number of rows in the table and initially mark all as being visible.
+ numRows = [self getNumberOfRows];
+ areShowingAllRows = YES;
+
// Remove existing columns from the table
theColumns = [tableContentView tableColumns];
while ([theColumns count]) {
@@ -260,10 +264,6 @@
[argumentField setStringValue:preservedFilterValue];
areShowingAllRows = NO;
}
- else
- {
- areShowingAllRows = YES;
- }
// Enable or disable the limit fields according to preference setting
if ( [prefs boolForKey:@"limitRows"] )
@@ -274,6 +274,8 @@
[limitRowsStepper setEnabled:YES];
[limitRowsText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Limited to %d rows starting with row", @"text showing the number of rows the result is limited to"),
[prefs integerForKey:@"limitRowsValue"]]];
+ if ([prefs integerForKey:@"limitRowsValue"] < numRows)
+ areShowingAllRows = NO;
}
else
{