Commit 4873ca47 authored by David Fuhrmann's avatar David Fuhrmann

macosx: audio effects: Explain reasoning for UI manipulation in init

In init, the window is not loaded yet, so changing UI elements
does not work yet (pointers are null). It does not harm either, due to
objc behaviour on null object. But it also initializes the needed playlist
variables.
In the longer term, this should probably be splitted, as touching
lots of non-existing UI elements in init is not ideal.
parent 7798c907
......@@ -98,10 +98,12 @@
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
if ([defaults boolForKey:@"AudioEffectApplyProfileOnStartup"])
{
// This does not reset the UI (which does not exist yet), but it initalizes needed playlist vars
[self equalizerUpdated];
[self resetCompressor];
[self resetSpatializer];
[self resetAudioFilters];
[self loadProfile];
}
else
......
......@@ -71,7 +71,9 @@
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
if ([defaults boolForKey:@"VideoEffectApplyProfileOnStartup"]) {
// This does not reset the UI (which does not exist yet), but it initalizes needed playlist vars
[self resetValues];
[self loadProfile];
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment