Update of /cvsroot/audacity/audacity-src/src/toolbars
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv26203

Modified Files:
        MeterToolBar.h MeterToolBar.cpp 
Log Message:
Do not reference meters if they've been deleted

Index: MeterToolBar.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/toolbars/MeterToolBar.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- MeterToolBar.h      16 Sep 2006 05:54:36 -0000      1.1
+++ MeterToolBar.h      23 May 2007 23:26:43 -0000      1.2
@@ -31,6 +31,7 @@
    virtual ~MeterToolBar();
 
    void Create(wxWindow *parent);
+   bool DestroyChildren();
 
    virtual void Populate();
    virtual void Repaint(wxDC *dc) {};

Index: MeterToolBar.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/toolbars/MeterToolBar.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- MeterToolBar.cpp    22 Feb 2007 06:48:48 -0000      1.3
+++ MeterToolBar.cpp    23 May 2007 23:26:43 -0000      1.4
@@ -32,6 +32,7 @@
 
 #include "MeterToolBar.h"
 
+#include "../AudioIO.h"
 #include "../widgets/Meter.h"
 
 IMPLEMENT_CLASS(MeterToolBar, ToolBar);
@@ -93,6 +94,18 @@
    mPlayMeter->SetToolTip( _("Output level meter") );
    mRecordMeter->SetToolTip( _("Input level meter - click to monitor input") );
 #endif
+
+   if (gAudioIO) {
+      gAudioIO->SetMeters(mRecordMeter, mPlayMeter);
+   }
+}
+
+bool MeterToolBar::DestroyChildren()
+{
+   mPlayMeter = NULL;
+   mRecordMeter = NULL;
+   gAudioIO->SetMeters(NULL, NULL);
+   ToolBar::DestroyChildren();
 }
 
 void MeterToolBar::OnSize( wxSizeEvent & evt )


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to