1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2025-03-10 05:34:36 +00:00

[#179] Fixed a crash under Cocoa when deleting many folders at once.

This commit is contained in:
Virgil Dupras 2011-11-28 15:42:13 -05:00
parent 1b7068bfe9
commit d8970ca6b4

View File

@ -101,7 +101,6 @@ http://www.hardcoded.net/licenses/bsd_license
{
[[self window] makeKeyAndOrderFront:nil];
[[outline py] removeSelectedDirectory];
[outlineView setNeedsDisplay:YES];
[self refreshRemoveButtonText];
}
@ -131,11 +130,13 @@ http://www.hardcoded.net/licenses/bsd_license
}
[removeButton setEnabled:YES];
NSIndexPath *path = [outline selectedIndexPath];
if (path != nil) {
NSInteger state = [outline intProperty:@"state" valueAtPath:path];
BOOL shouldDisplayArrow = ([path length] > 1) && (state == 2);
NSString *imgName = shouldDisplayArrow ? @"NSGoLeftTemplate" : @"NSRemoveTemplate";
[removeButton setImage:[NSImage imageNamed:imgName]];
}
}
/* Delegate */
- (BOOL)panel:(id)sender shouldShowFilename:(NSString *)path