mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-02 00:29:41 +02:00
Bug36, partial: Redraw mixer board when meter range preference changes
This commit is contained in:
parent
116ea61d11
commit
ad586b3e69
@ -342,6 +342,12 @@ MixerTrackCluster::MixerTrackCluster(wxWindow* parent,
|
|||||||
#endif
|
#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.
|
void MixerTrackCluster::HandleResize() // For wxSizeEvents, update gain slider and meter.
|
||||||
{
|
{
|
||||||
wxSize scrolledWindowClientSize = this->GetParent()->GetClientSize();
|
wxSize scrolledWindowClientSize = this->GetParent()->GetClientSize();
|
||||||
@ -1036,6 +1042,12 @@ MixerBoard::~MixerBoard()
|
|||||||
this);
|
this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MixerBoard::UpdatePrefs()
|
||||||
|
{
|
||||||
|
for (unsigned int nClusterIndex = 0; nClusterIndex < mMixerTrackClusters.GetCount(); nClusterIndex++)
|
||||||
|
mMixerTrackClusters[nClusterIndex]->UpdatePrefs();
|
||||||
|
}
|
||||||
|
|
||||||
// Reassign mixer input strips (MixerTrackClusters) to Track Clusters
|
// Reassign mixer input strips (MixerTrackClusters) to Track Clusters
|
||||||
// both have the same order.
|
// both have the same order.
|
||||||
// If EXPERIMENTAL_MIDI_OUT, then Note Tracks appear in the
|
// If EXPERIMENTAL_MIDI_OUT, then Note Tracks appear in the
|
||||||
|
@ -78,6 +78,8 @@ public:
|
|||||||
const wxSize& size = wxDefaultSize);
|
const wxSize& size = wxDefaultSize);
|
||||||
virtual ~MixerTrackCluster() {}
|
virtual ~MixerTrackCluster() {}
|
||||||
|
|
||||||
|
void UpdatePrefs();
|
||||||
|
|
||||||
void HandleResize(); // For wxSizeEvents, update gain slider and meter.
|
void HandleResize(); // For wxSizeEvents, update gain slider and meter.
|
||||||
|
|
||||||
void HandleSliderGain(const bool bWantPushState = false);
|
void HandleSliderGain(const bool bWantPushState = false);
|
||||||
@ -203,6 +205,8 @@ public:
|
|||||||
const wxSize& size = wxDefaultSize);
|
const wxSize& size = wxDefaultSize);
|
||||||
virtual ~MixerBoard();
|
virtual ~MixerBoard();
|
||||||
|
|
||||||
|
void UpdatePrefs();
|
||||||
|
|
||||||
// Add clusters for any tracks we're not yet showing.
|
// Add clusters for any tracks we're not yet showing.
|
||||||
// Update pointers for tracks we're aleady showing.
|
// Update pointers for tracks we're aleady showing.
|
||||||
void UpdateTrackClusters();
|
void UpdateTrackClusters();
|
||||||
|
@ -1127,7 +1127,7 @@ void AudacityProject::UpdatePrefs()
|
|||||||
mTrackPanel->UpdatePrefs();
|
mTrackPanel->UpdatePrefs();
|
||||||
}
|
}
|
||||||
if (mMixerBoard)
|
if (mMixerBoard)
|
||||||
mMixerBoard->ResizeTrackClusters(); // in case prefs "/GUI/Solo" changed
|
mMixerBoard->UpdatePrefs();
|
||||||
|
|
||||||
if (mToolManager) {
|
if (mToolManager) {
|
||||||
mToolManager->UpdatePrefs();
|
mToolManager->UpdatePrefs();
|
||||||
|
@ -245,6 +245,11 @@ Meter::Meter(AudacityProject *project,
|
|||||||
SetAccessible(new MeterAx(this));
|
SetAccessible(new MeterAx(this));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Do this BEFORE UpdatePrefs()!
|
||||||
|
mRuler.SetFonts(GetFont(), GetFont(), GetFont());
|
||||||
|
mRuler.SetFlip(mStyle != MixerTrackCluster);
|
||||||
|
mRuler.SetLabelEdges(true);
|
||||||
|
|
||||||
UpdatePrefs();
|
UpdatePrefs();
|
||||||
|
|
||||||
wxColour backgroundColour =
|
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);
|
mTimer.SetOwner(this, OnMeterUpdateID);
|
||||||
// TODO: Yikes. Hard coded sample rate.
|
// TODO: Yikes. Hard coded sample rate.
|
||||||
// JKC: I've looked at this, and it's benignish. It just means that the meter
|
// JKC: I've looked at this, and it's benignish. It just means that the meter
|
||||||
|
Loading…
x
Reference in New Issue
Block a user