aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPFavoritesExporter.m
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-05-11 02:04:06 +0200
committerMax <post@wickenrode.com>2015-05-11 02:04:06 +0200
commit11b8718ddfd44dc5786ac745f90fa390aaf57a06 (patch)
tree95689086e2ba13016034a0cab3382e5fc7e52084 /Source/SPFavoritesExporter.m
parent0f11cb74639d17a2fe512ed81d67ccf33601b605 (diff)
downloadsequelpro-11b8718ddfd44dc5786ac745f90fa390aaf57a06.tar.gz
sequelpro-11b8718ddfd44dc5786ac745f90fa390aaf57a06.tar.bz2
sequelpro-11b8718ddfd44dc5786ac745f90fa390aaf57a06.zip
* Fully enable export of favorite groups
* Favorites can now be imported, sorted even if "Quick Connect" is selected * Favorite files containing groups will now be imported correctly * If a favorite and the group containing said favorite are exported, the favorite will no longer be included twice
Diffstat (limited to 'Source/SPFavoritesExporter.m')
-rw-r--r--Source/SPFavoritesExporter.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/SPFavoritesExporter.m b/Source/SPFavoritesExporter.m
index a8b78a86..d37ce07d 100644
--- a/Source/SPFavoritesExporter.m
+++ b/Source/SPFavoritesExporter.m
@@ -74,7 +74,10 @@
// Get a dictionary representation of all favorites
for (SPTreeNode *node in [self exportFavorites])
{
- [favorites addObject:[node dictionaryRepresentation]];
+ // The selection could contain a group as well as items in that group.
+ // So we skip those items, as their group will already export them.
+ if(![node isDescendantOfNodes:[self exportFavorites]])
+ [favorites addObject:[node dictionaryRepresentation]];
}
NSDictionary *dictionary = @{SPFavoritesDataRootKey : favorites};