From dc15bc77440a5d88f5a133b1bc52e931df7fe46a Mon Sep 17 00:00:00 2001 From: michael starke Date: Mon, 11 Aug 2014 20:02:45 +0200 Subject: [PATCH] Clear key file button not working at password input. Fixes #184 --- MacPass/MPPasswordInputController.m | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/MacPass/MPPasswordInputController.m b/MacPass/MPPasswordInputController.m index 2c7be921..0860cc45 100644 --- a/MacPass/MPPasswordInputController.m +++ b/MacPass/MPPasswordInputController.m @@ -103,7 +103,13 @@ } - (IBAction)resetKeyFile:(id)sender { - [self _selectKeyURL]; + /* If the reset was triggerd by ourselves we want to preselct the keyfile */ + if(sender == self) { + [self _selectKeyURL]; + } + else { + [self.keyPathControl setURL:nil]; + } } - (void)_reset { @@ -112,7 +118,7 @@ [self.passwordTextField setStringValue:@""]; [self.errorInfoTextField setHidden:YES]; [self.errorImageView setHidden:YES]; - [self resetKeyFile:nil]; + [self resetKeyFile:self]; } - (void)_selectKeyURL {