aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableContentDataSource.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2014-06-23 01:00:47 +0100
committerrowanbeentje <rowan@beent.je>2014-06-23 01:00:47 +0100
commitd15bf9942f4153b2108d07e50bad6e00f3ac42da (patch)
tree36902ca9b37e426a28704ab78e65e85b76af27b7 /Source/SPTableContentDataSource.m
parent690c2fa83a5a3138bf4aa0fa862565c833b72d2a (diff)
downloadsequelpro-d15bf9942f4153b2108d07e50bad6e00f3ac42da.tar.gz
sequelpro-d15bf9942f4153b2108d07e50bad6e00f3ac42da.tar.bz2
sequelpro-d15bf9942f4153b2108d07e50bad6e00f3ac42da.zip
Always use the shortStringRepresentationUsingEncoding: code path when displaying table contents, as it saves a lot of shouldUseFieldEditorForRow: checks; shortStringRepresentationUsingEncoding: should return the same values for short strings
Diffstat (limited to 'Source/SPTableContentDataSource.m')
-rw-r--r--Source/SPTableContentDataSource.m13
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/SPTableContentDataSource.m b/Source/SPTableContentDataSource.m
index 52170a2b..c7af81be 100644
--- a/Source/SPTableContentDataSource.m
+++ b/Source/SPTableContentDataSource.m
@@ -76,9 +76,9 @@
else {
return NSArrayObjectAtIndex([[filterTableData objectForKey:[NSNumber numberWithInteger:rowIndex]] objectForKey:SPTableContentFilterKey], [[tableColumn identifier] integerValue] - 1);
}
- else {
- return NSArrayObjectAtIndex([[filterTableData objectForKey:[tableColumn identifier]] objectForKey:SPTableContentFilterKey], rowIndex);
- }
+ else {
+ return NSArrayObjectAtIndex([[filterTableData objectForKey:[tableColumn identifier]] objectForKey:SPTableContentFilterKey], rowIndex);
+ }
}
else
#endif
@@ -134,11 +134,8 @@
fieldEditorCheckLock = &tableValuesLock;
}
- if ([tableContentView shouldUseFieldEditorForRow:rowIndex column:columnIndex checkWithLock:fieldEditorCheckLock]) {
- return [value shortStringRepresentationUsingEncoding:[mySQLConnection stringEncoding]];
- }
-
- return [value stringRepresentationUsingEncoding:[mySQLConnection stringEncoding]];
+ // Always retrieve the short string representation, truncating the value where necessary
+ return [value shortStringRepresentationUsingEncoding:[mySQLConnection stringEncoding]];
}
if ([value isSPNotLoaded]) {