1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-01 16:19:43 +02:00

Bug36, partial: Redraw mixer board when meter range preference changes

This commit is contained in:
Paul Licameli 2016-01-19 14:05:50 -05:00
parent 116ea61d11
commit ad586b3e69
4 changed files with 22 additions and 5 deletions

View File

@ -342,6 +342,12 @@ MixerTrackCluster::MixerTrackCluster(wxWindow* parent,
#endif
}
void MixerTrackCluster::UpdatePrefs()
{
mMeter->UpdatePrefs(); // in case meter range has changed
HandleResize(); // in case prefs "/GUI/Solo" changed
}
void MixerTrackCluster::HandleResize() // For wxSizeEvents, update gain slider and meter.
{
wxSize scrolledWindowClientSize = this->GetParent()->GetClientSize();
@ -1036,6 +1042,12 @@ MixerBoard::~MixerBoard()
this);
}
void MixerBoard::UpdatePrefs()
{
for (unsigned int nClusterIndex = 0; nClusterIndex < mMixerTrackClusters.GetCount(); nClusterIndex++)
mMixerTrackClusters[nClusterIndex]->UpdatePrefs();
}
// Reassign mixer input strips (MixerTrackClusters) to Track Clusters
// both have the same order.
// If EXPERIMENTAL_MIDI_OUT, then Note Tracks appear in the

View File

@ -78,6 +78,8 @@ public:
const wxSize& size = wxDefaultSize);
virtual ~MixerTrackCluster() {}
void UpdatePrefs();
void HandleResize(); // For wxSizeEvents, update gain slider and meter.
void HandleSliderGain(const bool bWantPushState = false);
@ -203,6 +205,8 @@ public:
const wxSize& size = wxDefaultSize);
virtual ~MixerBoard();
void UpdatePrefs();
// Add clusters for any tracks we're not yet showing.
// Update pointers for tracks we're aleady showing.
void UpdateTrackClusters();

View File

@ -1127,7 +1127,7 @@ void AudacityProject::UpdatePrefs()
mTrackPanel->UpdatePrefs();
}
if (mMixerBoard)
mMixerBoard->ResizeTrackClusters(); // in case prefs "/GUI/Solo" changed
mMixerBoard->UpdatePrefs();
if (mToolManager) {
mToolManager->UpdatePrefs();

View File

@ -245,6 +245,11 @@ Meter::Meter(AudacityProject *project,
SetAccessible(new MeterAx(this));
#endif
// Do this BEFORE UpdatePrefs()!
mRuler.SetFonts(GetFont(), GetFont(), GetFont());
mRuler.SetFlip(mStyle != MixerTrackCluster);
mRuler.SetLabelEdges(true);
UpdatePrefs();
wxColour backgroundColour =
@ -310,10 +315,6 @@ Meter::Meter(AudacityProject *project,
}
}
mRuler.SetFonts(GetFont(), GetFont(), GetFont());
mRuler.SetFlip(true);
mRuler.SetLabelEdges(true);
mTimer.SetOwner(this, OnMeterUpdateID);
// TODO: Yikes. Hard coded sample rate.
// JKC: I've looked at this, and it's benignish. It just means that the meter