Update of /cvsroot/audacity/audacity-src/src/widgets
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv14535
Modified Files:
Ruler.h Ruler.cpp
Log Message:
Remove dependency on the TrackPanel...reference the project directly. This
allows destroying the 2 in any order.
Index: Ruler.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/widgets/Ruler.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- Ruler.h 19 Aug 2006 18:51:42 -0000 1.17
+++ Ruler.h 17 Sep 2006 01:10:37 -0000 1.18
@@ -19,7 +19,7 @@
#include "../Envelope.h"
struct ViewInfo;
-class TrackPanel;
+class AudacityProject;
class Ruler {
public:
@@ -207,9 +207,7 @@
void ClearPlayRegion();
void GetPlayRegion(double* playRegionStart, double* playRegionEnd);
- void SetTrackPanel(TrackPanel* trackPanel) { mTrackPanel = trackPanel; }
-
-public:
+ void SetProject(AudacityProject* project) {mProject = project;};
private:
void OnErase(wxEraseEvent &evt);
@@ -233,7 +231,7 @@
Ruler ruler;
ViewInfo *mViewInfo;
- TrackPanel *mTrackPanel;
+ AudacityProject *mProject;
wxBitmap *mBuffer;
Index: Ruler.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/widgets/Ruler.cpp,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- Ruler.cpp 16 Sep 2006 05:54:38 -0000 1.40
+++ Ruler.cpp 17 Sep 2006 01:10:37 -0000 1.41
@@ -64,7 +64,6 @@
#include "../Internat.h"
#include "../Project.h"
#include "Ruler.h"
-#include "../TrackPanel.h"
#include "../toolbars/ControlToolBar.h"
#include "../Theme.h"
#include "../AllThemeResources.h"
@@ -1110,7 +1109,6 @@
SetLabel( _("Vertical Ruler") );
SetName( _("Vertical Ruler") );
- mTrackPanel = NULL;
mLeftOffset = 0;
mCurPos = -1;
mIndPos = -1;
@@ -1300,9 +1298,9 @@
mMouseEventState = mesNone;
- if (startPlaying && mTrackPanel)
+ if (startPlaying)
{
- ControlToolBar* ctb = mTrackPanel->GetProject()->GetControlToolBar();
+ ControlToolBar* ctb = mProject->GetControlToolBar();
ctb->StopPlaying();
ctb->PlayDefault();
}
@@ -1335,9 +1333,6 @@
void AdornedRulerPanel::DoDrawPlayRegion(wxDC *dc)
{
- if( mTrackPanel == NULL )
- return;
-
double start, end;
GetPlayRegion(&start, &end);
@@ -1347,7 +1342,7 @@
int x2 = Time2Pos(end);
int y = mInner.height/2;
- bool isLocked = mTrackPanel->GetProject()->IsPlayRegionLocked();
+ bool isLocked = mProject->IsPlayRegionLocked();
AColor::PlayRegionColor(dc, isLocked);
wxPoint tri[3];
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs