From 9bf75801b4ef046cd8075777f89271cf69cb3aa5 Mon Sep 17 00:00:00 2001 From: vspader Date: Thu, 24 Jan 2008 02:33:55 +0000 Subject: [PATCH] Fixed bug in seperator double-click when using formatters. --- Playlist/PlaylistHeaderView.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Playlist/PlaylistHeaderView.m b/Playlist/PlaylistHeaderView.m index 5529dfa96..0fe9eb161 100644 --- a/Playlist/PlaylistHeaderView.m +++ b/Playlist/PlaylistHeaderView.m @@ -34,10 +34,9 @@ if (clickedSeperator) { NSTableColumn *col = [[[self tableView] tableColumns] objectAtIndex:column]; - + //Info about the font and such NSCell *cell = [col dataCell]; - NSAttributedString * as = [cell attributedStringValue]; //Binding info...reaching deep! NSDictionary *bindingInfo = [col infoForBinding:@"value"]; @@ -48,9 +47,10 @@ id row; NSEnumerator *enumerator = [boundArray objectEnumerator]; while (row = [enumerator nextObject]) { - NSString *s = [row description]; - - float width = [s sizeWithAttributes:[as attributesAtIndex:0 effectiveRange:nil]].width; + + [cell setObjectValue:row]; + + float width = [cell cellSize].width; if (width > max_width) max_width = width; }