From 9309908a0e5e425314f9e602ed79056134aa7750 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Sat, 27 Nov 2010 17:32:17 +0000 Subject: - Right-align numeric columns in table content views and custom query results - Fix exceptions caused by nil SSL locations when re-saving old session files --- Source/SPTableContent.m | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Source/SPTableContent.m') diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index 5b7f4a4b..393e0e94 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -483,6 +483,14 @@ } else { dataCell = [[[SPTextAndLinkCell alloc] initTextCell:@""] autorelease]; } + + // Set the column to right-aligned for numeric data types + if ([[columnDefinition objectForKey:@"typegrouping"] isEqualToString:@"integer"] + || [[columnDefinition objectForKey:@"typegrouping"] isEqualToString:@"float"]) + { + [dataCell setAlignment:NSRightTextAlignment]; + } + [dataCell setEditable:YES]; // Set the line break mode and an NSFormatter subclass which truncates long strings for display -- cgit v1.2.3