Fixed wrongfully setting password when password is disabled in editPasswordWindow

Removed some debug logging
This commit is contained in:
michael starke
2013-11-24 00:00:14 +01:00
parent ce61fafc53
commit b0856ad2df
3 changed files with 3 additions and 4 deletions

View File

@@ -87,7 +87,9 @@
#pragma mark Actions
- (IBAction)save:(id)sender {
[_currentDocument changePassword:[self.passwordTextField stringValue] keyFileURL:[self.keyfilePathControl URL]];
const BOOL hasPassword = ([self.hasPasswordSwitchButton state] == NSOnState);
NSString *password = hasPassword ? [self.passwordTextField stringValue] : nil;
[_currentDocument changePassword:password keyFileURL:[self.keyfilePathControl URL]];
[self dismissSheet:NSRunStoppedResponse];
if(self.delegate && [self.delegate respondsToSelector:@selector(didFinishPasswordEditing:)]) {
[self.delegate didFinishPasswordEditing:YES];