From 2281746fdc1f1a2ff93fc28fc0182614445d5938 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Sun, 26 Sep 2010 20:26:39 +0000 Subject: Tweak favourites sorting from r2696, fixing exceptions when no sort type is selected --- Source/SPConnectionController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/SPConnectionController.m') diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index 6e760a9d..baa09262 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -133,8 +133,8 @@ [favoritesTable registerForDraggedTypes:[NSArray arrayWithObject:favoritesPBoardType]]; [favoritesTable setDraggingSourceOperationMask:NSDragOperationMove forLocal:YES]; - // Sort the favourites to match prefs and select the appropriate row - [self _sortFavorites]; + // Sort the favourites to match prefs and select the appropriate row - if a valid sort option is selected + if (currentSortItem > -1) [self _sortFavorites]; NSInteger tableRow = ([prefs integerForKey:[prefs boolForKey:SPSelectLastFavoriteUsed] ? SPLastFavoriteIndex : SPDefaultFavorite] + 1); -- cgit v1.2.3