diff options
-rw-r--r-- | Source/SPConnectionController.m | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index f6e23656..12ead317 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -720,6 +720,9 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, SPTreeNode *selectedNode = [self selectedFavoriteNode]; SPTreeNode *parent = ([selectedNode isGroup]) ? selectedNode : (SPTreeNode *)[selectedNode parentNode]; + + // Ensure the parent is expanded + [favoritesOutlineView expandItem:parent]; SPTreeNode *node = [favoritesController addFavoriteNodeWithData:favorite asChildOfNode:parent]; @@ -750,7 +753,10 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, SPTreeNode *selectedNode = [self selectedFavoriteNode]; SPTreeNode *parent = ([selectedNode isGroup]) ? selectedNode : (SPTreeNode *)[selectedNode parentNode]; - + + // Ensure the parent is expanded + [favoritesOutlineView expandItem:parent]; + SPTreeNode *node = [favoritesController addGroupNodeWithName:NSLocalizedString(@"New Folder", @"new folder placeholder name") asChildOfNode:parent]; [self _reloadFavoritesViewData]; @@ -1274,6 +1280,9 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, parentNode = (SPTreeNode *)[selectedNode parentNode]; } + // Ensure the parent is expanded + [favoritesOutlineView expandItem:parentNode]; + // Add the new node and select it SPTreeNode *newNode = [favoritesController addFavoriteNodeWithData:theFavorite asChildOfNode:parentNode]; [self _reloadFavoritesViewData]; |