mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-17 18:19:26 +00:00
Fixed hotkeys being unregistered when changing tabs. Fixes #883
This commit is contained in:
@@ -82,9 +82,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)willShowTab {
|
- (void)willShowTab {
|
||||||
_hotKey = [DDHotKey hotKeyWithKeyData:[NSUserDefaults.standardUserDefaults dataForKey:kMPSettingsKeyGlobalAutotypeKeyDataKey]];
|
if(!_hotKey) {
|
||||||
/* Change any invalid hotkeys to valid ones? */
|
_hotKey = [DDHotKey hotKeyWithKeyData:[NSUserDefaults.standardUserDefaults dataForKey:kMPSettingsKeyGlobalAutotypeKeyDataKey]];
|
||||||
self.hotKeyTextField.hotKey = self.hotKey;
|
}
|
||||||
|
/* Only call the setter if the hotkeys are different, otherwise the dealloc call will unregister them*/
|
||||||
|
if(![self.hotKeyTextField.hotKey isEqual:self.hotKey]) {
|
||||||
|
self.hotKeyTextField.hotKey = self.hotKey;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
|
|||||||
Reference in New Issue
Block a user