mirror of
https://github.com/cookiengineer/audacity
synced 2026-01-20 15:55:45 +01:00
Bug 1860 - Enh: Add preference to disable half-wave view on collapse.
This commit is contained in:
@@ -456,14 +456,19 @@ float WaveTrack::GetChannelGain(int channel) const
|
|||||||
void WaveTrack::DoSetMinimized(bool isMinimized){
|
void WaveTrack::DoSetMinimized(bool isMinimized){
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_HALF_WAVE
|
#ifdef EXPERIMENTAL_HALF_WAVE
|
||||||
// Show half wave on collapse, full on restore.
|
bool bHalfWave;
|
||||||
std::shared_ptr<TrackVRulerControls> pTvc = GetVRulerControls();
|
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'.
|
// 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.
|
// We use magic numbers, 0 and 1, to tell it to zoom reset or zoom half-wave.
|
||||||
WaveTrackVRulerControls * pWtvc = reinterpret_cast<WaveTrackVRulerControls*>(pTvc.get());
|
WaveTrackVRulerControls * pWtvc = reinterpret_cast<WaveTrackVRulerControls*>(pTvc.get());
|
||||||
if( pWtvc )
|
if( pWtvc )
|
||||||
pWtvc->DoZoomPreset( isMinimized ? 1:0);
|
pWtvc->DoZoomPreset( isMinimized ? 1:0);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PlayableTrack::DoSetMinimized( isMinimized );
|
PlayableTrack::DoSetMinimized( isMinimized );
|
||||||
|
|||||||
@@ -265,6 +265,11 @@ void TracksPrefs::PopulateOrExchange(ShuttleGui & S)
|
|||||||
S.TieCheckBox(_("Sho&w audio track name as overlay"),
|
S.TieCheckBox(_("Sho&w audio track name as overlay"),
|
||||||
wxT("/GUI/ShowTrackNameInWaveform"),
|
wxT("/GUI/ShowTrackNameInWaveform"),
|
||||||
false);
|
false);
|
||||||
|
#ifdef EXPERIMENTAL_HALF_WAVE
|
||||||
|
S.TieCheckBox(_("Use &half-wave display when collapsed"),
|
||||||
|
wxT("/GUI/CollapseToHalfWave"),
|
||||||
|
false);
|
||||||
|
#endif
|
||||||
|
|
||||||
S.AddSpace(10);
|
S.AddSpace(10);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user