Update of /cvsroot/audacity/audacity-src/src
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv18213

Modified Files:
        Menus.cpp TrackPanel.cpp 
Log Message:

When tracks are deleted from the main tracklist, like when Effects are
run, then the focused track must be reset.  On at least wxGTK, this must
be handled as soon as the tracklist is updated since the TrackPanel gets
refreshed before control returns from the effect.  So, use the new tracklist
notification scheme to reset focus when it's detected that the focused 
track was deleted.


Index: Menus.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Menus.cpp,v
retrieving revision 1.478
retrieving revision 1.479
diff -u -d -r1.478 -r1.479
--- Menus.cpp   27 May 2009 05:52:03 -0000      1.478
+++ Menus.cpp   28 May 2009 04:57:59 -0000      1.479
@@ -2400,7 +2400,7 @@
                    &mViewInfo.sel0, &mViewInfo.sel1)) {
       wxString longDesc = f->GetEffectDescription();
       wxString shortDesc = f->GetEffectName();
-
+ 
       if (shortDesc.Length() > 3 && shortDesc.Right(3)==wxT("..."))
          shortDesc = shortDesc.Left(shortDesc.Length()-3);
 

Index: TrackPanel.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/TrackPanel.cpp,v
retrieving revision 1.454
retrieving revision 1.455
diff -u -d -r1.454 -r1.455
--- TrackPanel.cpp      26 May 2009 06:12:30 -0000      1.454
+++ TrackPanel.cpp      28 May 2009 04:58:00 -0000      1.455
@@ -3518,6 +3518,11 @@
 // a resize has taken place.
 void TrackPanel::OnTrackListUpdated(wxCommandEvent & e)
 {
+   // Tracks may have been deleted, so check to see if the focused track was 
on of them.
+   if (!mTracks->Contains(GetFocusedTrack())) {
+      SetFocusedTrack(NULL);
+   }
+
    if (e.GetClientData()) {
       OnTrackListResized(e);
       return;


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to