Fixed #4: OutlineViewController now calls the correct method to remove groups

This commit is contained in:
michael starke
2013-06-09 11:47:48 +02:00
parent cadf3a32ff
commit 6087b2ece0
2 changed files with 5 additions and 5 deletions

View File

@@ -108,7 +108,7 @@
- (void)createGroup:(id)sender { - (void)createGroup:(id)sender {
KdbGroup *group = [self _clickedOrSelectedGroup]; KdbGroup *group = [self _clickedOrSelectedGroup];
MPDocument *document = [[NSDocumentController sharedDocumentController] currentDocument]; MPDocument *document = [[self windowController] document];
if(!group) { if(!group) {
group = document.root; group = document.root;
} }
@@ -130,7 +130,7 @@
return; // Entries are not allowed in root group return; // Entries are not allowed in root group
} }
if(group) { if(group) {
MPDocument *document = [[NSDocumentController sharedDocumentController] currentDocument]; MPDocument *document = [[self windowController] document];
[document createEntry:group]; [document createEntry:group];
// Notify the the entry view about changes // Notify the the entry view about changes
} }
@@ -139,8 +139,8 @@
- (void)deleteEntry:(id)sender { - (void)deleteEntry:(id)sender {
KdbGroup *group = [self _clickedOrSelectedGroup]; KdbGroup *group = [self _clickedOrSelectedGroup];
if(group) { if(group) {
[group.parent removeGroup:group]; MPDocument *document = [[self windowController] document];
[self.outlineView reloadData]; [document deleteGroup:group];
} }
} }

View File

@@ -48,7 +48,7 @@
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>AB9</string> <string>ABD</string>
<key>LSMinimumSystemVersion</key> <key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string> <string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key> <key>NSHumanReadableCopyright</key>