aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTreeNode.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2011-03-17 19:25:56 +0000
committerstuconnolly <stuart02@gmail.com>2011-03-17 19:25:56 +0000
commitb2a0af91eae18b6490ddeafd2708d256b0d53cb3 (patch)
tree6fffce3be41ecf2f9a902f7bf795eb9471d81382 /Source/SPTreeNode.m
parent1632c45fdd9d0b8fe1e0aef3e891e8bd5704df29 (diff)
downloadsequelpro-b2a0af91eae18b6490ddeafd2708d256b0d53cb3.tar.gz
sequelpro-b2a0af91eae18b6490ddeafd2708d256b0d53cb3.tar.bz2
sequelpro-b2a0af91eae18b6490ddeafd2708d256b0d53cb3.zip
Bind the default favorites drop down menu pref to the new favorites data file, with sub-menus representing groups (still a bit buggy).
Diffstat (limited to 'Source/SPTreeNode.m')
-rw-r--r--Source/SPTreeNode.m14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/SPTreeNode.m b/Source/SPTreeNode.m
index e197d180..d93db01b 100644
--- a/Source/SPTreeNode.m
+++ b/Source/SPTreeNode.m
@@ -69,7 +69,7 @@ static NSString *SPTreeNodeIsGroupKey = @"SPTreeNodeIsGroup";
return;
}
- if (![node isLeaf]) {
+ if ([node isGroup]) {
[node removeObjectFromChildren:object];
}
}
@@ -88,7 +88,7 @@ static NSString *SPTreeNodeIsGroupKey = @"SPTreeNodeIsGroup";
{
[descendants addObject:node];
- if (![node isLeaf]) {
+ if ([node isGroup]) {
[descendants addObjectsFromArray:[node descendants]];
}
}
@@ -107,7 +107,7 @@ static NSString *SPTreeNodeIsGroupKey = @"SPTreeNodeIsGroup";
for (SPTreeNode *node in [self childNodes])
{
- if ([node isLeaf]) {
+ if (![node isGroup]) {
[childLeafs addObject:node];
}
}
@@ -127,7 +127,7 @@ static NSString *SPTreeNodeIsGroupKey = @"SPTreeNodeIsGroup";
for (SPTreeNode *node in [self childNodes])
{
- if ([node isLeaf]) {
+ if (![node isGroup]) {
[childLeafs addObject:node];
}
else {
@@ -149,7 +149,7 @@ static NSString *SPTreeNodeIsGroupKey = @"SPTreeNodeIsGroup";
for (SPTreeNode *node in [self childNodes])
{
- if (![node isLeaf]) {
+ if ([node isGroup]) {
[groupChildren addObject:node];
}
}
@@ -177,7 +177,7 @@ static NSString *SPTreeNodeIsGroupKey = @"SPTreeNodeIsGroup";
break;
}
- if (![node isLeaf]) {
+ if ([node isGroup]) {
SPTreeNode *innerNode = [self parentFromArray:[node childNodes]];
if (innerNode) {
@@ -205,7 +205,7 @@ static NSString *SPTreeNodeIsGroupKey = @"SPTreeNodeIsGroup";
if (node == self) return YES;
// Check all the sub-nodes
- if (![node isLeaf]) {
+ if ([node isGroup]) {
if ([self isDescendantOfOrOneOfNodes:[node childNodes]]) {
return YES;
}