diff options
author | Damiano Galassi <[email protected]> | 2015-10-24 10:50:27 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2015-10-24 10:50:27 +0200 |
commit | 7e32b94a04e073aa94b51811200b664a5001f983 (patch) | |
tree | 8b328e88162db42ee1d9237a61ea2c97f4c0183d /macosx/HBAudioDefaults.m | |
parent | 97e6ad384476b97cbc36bfb0a81ac179b1fc7d70 (diff) |
MacGui: add redo/undo supports to the audio part of HBJob.
Diffstat (limited to 'macosx/HBAudioDefaults.m')
-rw-r--r-- | macosx/HBAudioDefaults.m | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/macosx/HBAudioDefaults.m b/macosx/HBAudioDefaults.m index 4905afa8a..dc43a0372 100644 --- a/macosx/HBAudioDefaults.m +++ b/macosx/HBAudioDefaults.m @@ -49,6 +49,15 @@ _trackSelectionBehavior = trackSelectionBehavior; } +- (void)setTrackSelectionLanguages:(NSMutableArray<NSString *> *)trackSelectionLanguages +{ + if (trackSelectionLanguages != _trackSelectionLanguages) + { + [[self.undo prepareWithInvocationTarget:self] setTrackSelectionLanguages:_trackSelectionLanguages]; + } + _trackSelectionLanguages = trackSelectionLanguages; +} + - (void)setAllowAACPassthru:(BOOL)allowAACPassthru { if (allowAACPassthru != _allowAACPassthru) @@ -276,7 +285,10 @@ self.encoderFallback = hb_audio_encoder_get_from_name([preset[@"AudioEncoderFallback"] UTF8String]); } - [self.tracksArray removeAllObjects]; + while ([self countOfTracksArray]) + { + [self removeObjectFromTracksArrayAtIndex:0]; + } for (NSDictionary *track in preset[@"AudioList"]) { @@ -303,7 +315,7 @@ newTrack.drc = [track[@"AudioTrackDRCSlider"] doubleValue]; newTrack.gain = [track[@"AudioTrackGainSlider"] doubleValue]; - [self.tracksArray addObject:newTrack]; + [self insertObject:newTrack inTracksArrayAtIndex:[self countOfTracksArray]]; } } |