mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 17:32:17 +00:00
Fixed wrongfully setting password when password is disabled in editPasswordWindow
Removed some debug logging
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user