diff options
author | rowanbeentje <rowan@beent.je> | 2012-12-30 22:47:33 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2012-12-30 22:47:33 +0000 |
commit | 222bf6ddb31a12ed9a1659ab7e1f5b530c7b75d7 (patch) | |
tree | 5497da668271cf9876e8393cf503569f1fb6fad0 | |
parent | abdc7fc0c6f5961ed774a51299ecbde44d6a313c (diff) | |
download | sequelpro-222bf6ddb31a12ed9a1659ab7e1f5b530c7b75d7.tar.gz sequelpro-222bf6ddb31a12ed9a1659ab7e1f5b530c7b75d7.tar.bz2 sequelpro-222bf6ddb31a12ed9a1659ab7e1f5b530c7b75d7.zip |
- Prevent Groups from being created as a child of the Quick Connection item, instead creating them at the bottom of the favourites list to prevent favourite loss
-rw-r--r-- | Source/SPConnectionController.m | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index 1da6b46f..18899cc5 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -741,9 +741,7 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, SPTreeNode *parent = ([selectedNode isGroup] && selectedNode != quickConnectItem) ? selectedNode : (SPTreeNode *)[selectedNode parentNode]; SPTreeNode *node = [favoritesController addFavoriteNodeWithData:favorite asChildOfNode:parent]; - - //[self _reloadFavoritesViewData]; - + // Ensure the parent is expanded [favoritesOutlineView expandItem:parent]; @@ -773,7 +771,7 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, { SPTreeNode *selectedNode = [self selectedFavoriteNode]; - SPTreeNode *parent = ([selectedNode isGroup]) ? selectedNode : (SPTreeNode *)[selectedNode parentNode]; + SPTreeNode *parent = ([selectedNode isGroup] && selectedNode != quickConnectItem) ? selectedNode : (SPTreeNode *)[selectedNode parentNode]; // Ensure the parent is expanded [favoritesOutlineView expandItem:parent]; |