fixed #165 Password generator is reseted if opened as single window not via generate button on entry

This commit is contained in:
michael starke
2014-03-23 21:50:33 +01:00
parent 273b77572b
commit fb0007d1c0
3 changed files with 15 additions and 3 deletions

View File

@@ -108,13 +108,18 @@ typedef NS_ENUM(NSUInteger, MPPasswordRating) {
[self.symbolsButton setTag:MPPasswordCharactersSymbols];
[self _resetCharacters];
[self _generatePassword:nil];
[self _generatePassword:self];
}
- (void)reset {
[self _resetCharacters];
[self _generatePassword:self];
}
#pragma mark -
#pragma mark Actions
- (IBAction)_generatePassword:(id)sender {
- (IBAction)_generatePassword:(id)sender {
if(_useCustomString) {
if([[_customCharactersTextField stringValue] length] > 0) {
self.password = [[_customCharactersTextField stringValue] passwordWithLength:_passwordLength];