aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPConnectionControllerInitializer.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPConnectionControllerInitializer.m')
-rw-r--r--Source/SPConnectionControllerInitializer.m10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/SPConnectionControllerInitializer.m b/Source/SPConnectionControllerInitializer.m
index 2f4d725e..688b2016 100644
--- a/Source/SPConnectionControllerInitializer.m
+++ b/Source/SPConnectionControllerInitializer.m
@@ -307,7 +307,8 @@ static NSString *SPConnectionViewNibName = @"ConnectionView";
if (favorite == quickConnectItem) {
[self _selectNode:favorite];
- } else {
+ }
+ else {
NSNumber *typeNumber = [[[favorite representedObject] nodeFavorite] objectForKey:SPFavoriteTypeKey];
previousType = typeNumber ? [typeNumber integerValue] : SPTCPIPConnection;
@@ -344,11 +345,16 @@ static NSString *SPConnectionViewNibName = @"ConnectionView";
[self _reloadFavoritesViewData];
NSMutableIndexSet *selectionIndexes = [NSMutableIndexSet indexSet];
- for (SPTreeNode *eachNode in selectedFavoriteNodes) {
+
+ for (SPTreeNode *eachNode in selectedFavoriteNodes)
+ {
NSInteger anIndex = [favoritesOutlineView rowForItem:eachNode];
+
if (anIndex == -1) continue;
+
[selectionIndexes addIndex:anIndex];
}
+
[favoritesOutlineView selectRowIndexes:selectionIndexes byExtendingSelection:NO];
#endif
}