diff --git a/Quicksilver/Code-App/QSController.m b/Quicksilver/Code-App/QSController.m index 14ab95b74..676421209 100644 --- a/Quicksilver/Code-App/QSController.m +++ b/Quicksilver/Code-App/QSController.m @@ -985,8 +985,10 @@ - (void)startQuicksilver:(id)sender { [self runSetupAssistant:nil]; } char *visiblePref = getenv("QSVisiblePrefPane"); - if (visiblePref) + if (visiblePref) { [QSPreferencesController showPaneWithIdentifier:[NSString stringWithUTF8String:visiblePref]]; + unsetenv("QSVisiblePrefPane"); + } [QSResourceManager sharedInstance]; [[QSTriggerCenter sharedInstance] activateTriggers]; diff --git a/Quicksilver/Code-App/QSPreferencesController.m b/Quicksilver/Code-App/QSPreferencesController.m index 566ee84c6..c3b0a305e 100755 --- a/Quicksilver/Code-App/QSPreferencesController.m +++ b/Quicksilver/Code-App/QSPreferencesController.m @@ -70,9 +70,11 @@ - (id)init { } - (void)applicationWillRelaunch:(NSNotification *)notif { - id theID; - if (theID = [[[moduleController selectedObjects] lastObject] objectForKey:kItemID]) - setenv("QSVisiblePrefPane", [theID UTF8String] , YES); + if ([[self window] isVisible]) { + id theID; + if (theID = [[[moduleController selectedObjects] lastObject] objectForKey:kItemID]) + setenv("QSVisiblePrefPane", [theID UTF8String] , YES); + } } - (void)awakeFromNib {