1
0
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:
lllucius
2014-12-08 04:53:53 +00:00
parent 814ed57a68
commit 6539d693b3
4 changed files with 37 additions and 9 deletions

View File

@@ -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;

View File

@@ -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.