mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-01 16:19:43 +02:00
Bug 1860 - Enh: Add preference to disable half-wave view on collapse.
This commit is contained in:
parent
886388e02c
commit
2db691dc67
@ -456,14 +456,19 @@ float WaveTrack::GetChannelGain(int channel) const
|
||||
void WaveTrack::DoSetMinimized(bool isMinimized){
|
||||
|
||||
#ifdef EXPERIMENTAL_HALF_WAVE
|
||||
// Show half wave on collapse, full on restore.
|
||||
std::shared_ptr<TrackVRulerControls> pTvc = GetVRulerControls();
|
||||
bool bHalfWave;
|
||||
gPrefs->Read(wxT("/GUI/CollapseToHalfWave"), &bHalfWave, false);
|
||||
if( bHalfWave )
|
||||
{
|
||||
// Show half wave on collapse, full on restore.
|
||||
std::shared_ptr<TrackVRulerControls> pTvc = GetVRulerControls();
|
||||
|
||||
// An awkward workaround for a function that lives 'in the wrong place'.
|
||||
// We use magic numbers, 0 and 1, to tell it to zoom reset or zoom half-wave.
|
||||
WaveTrackVRulerControls * pWtvc = reinterpret_cast<WaveTrackVRulerControls*>(pTvc.get());
|
||||
if( pWtvc )
|
||||
pWtvc->DoZoomPreset( isMinimized ? 1:0);
|
||||
// An awkward workaround for a function that lives 'in the wrong place'.
|
||||
// We use magic numbers, 0 and 1, to tell it to zoom reset or zoom half-wave.
|
||||
WaveTrackVRulerControls * pWtvc = reinterpret_cast<WaveTrackVRulerControls*>(pTvc.get());
|
||||
if( pWtvc )
|
||||
pWtvc->DoZoomPreset( isMinimized ? 1:0);
|
||||
}
|
||||
#endif
|
||||
|
||||
PlayableTrack::DoSetMinimized( isMinimized );
|
||||
|
@ -265,6 +265,11 @@ void TracksPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
S.TieCheckBox(_("Sho&w audio track name as overlay"),
|
||||
wxT("/GUI/ShowTrackNameInWaveform"),
|
||||
false);
|
||||
#ifdef EXPERIMENTAL_HALF_WAVE
|
||||
S.TieCheckBox(_("Use &half-wave display when collapsed"),
|
||||
wxT("/GUI/CollapseToHalfWave"),
|
||||
false);
|
||||
#endif
|
||||
|
||||
S.AddSpace(10);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user