diff options
-rw-r--r-- | Source/SPConnectionController.m | 4 | ||||
-rw-r--r-- | Source/SPPreferenceController.m | 4 |
2 files changed, 4 insertions, 4 deletions
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); diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m index 4441c75d..932bed9c 100644 --- a/Source/SPPreferenceController.m +++ b/Source/SPPreferenceController.m @@ -109,8 +109,8 @@ [prefs synchronize]; - // Sort favorites - [self _sortFavorites]; + // Sort favorites if a sort type has been selected + if (currentSortItem > -1) [self _sortFavorites]; NSTableColumn *column; SPColorWellCell *colorCell; |