mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-04 15:50:10 +01:00
Fix for bug #783
This should correct the crash and will also correct the problem where one project's playback/capture was being metered in another project if multiple projects were open.
This commit is contained in:
@@ -68,6 +68,7 @@ MeterToolBar::MeterToolBar(int WhichMeters)
|
||||
|
||||
MeterToolBar::~MeterToolBar()
|
||||
{
|
||||
MeterToolBars::RemoveMeters(mPlayMeter, mRecordMeter);
|
||||
}
|
||||
|
||||
|
||||
@@ -220,6 +221,16 @@ bool MeterToolBar::Expose( bool show )
|
||||
return ToolBar::Expose( show );
|
||||
}
|
||||
|
||||
void MeterToolBar::Activate( bool active )
|
||||
{
|
||||
if( active )
|
||||
MeterToolBars::AddMeters( mPlayMeter, mRecordMeter );
|
||||
else
|
||||
MeterToolBars::RemoveMeters( mPlayMeter, mRecordMeter );
|
||||
|
||||
gAudioIO->SetMeters(mRecordMeter, mPlayMeter);
|
||||
}
|
||||
|
||||
wxSize MeterToolBar::GetDockedSize()
|
||||
{
|
||||
const int tbs = toolbarSingle + toolbarGap;
|
||||
|
||||
@@ -45,6 +45,7 @@ class MeterToolBar:public ToolBar {
|
||||
|
||||
virtual void OnSize(wxSizeEvent & event);
|
||||
virtual bool Expose( bool show );
|
||||
virtual void Activate( bool active );
|
||||
|
||||
int GetInitialWidth() {return (mWhichMeters ==
|
||||
(kWithRecordMeter + kWithPlayMeter)) ? 338 : 460;} // Separate bars used to be smaller.
|
||||
|
||||
Reference in New Issue
Block a user