Update of /cvsroot/audacity/audacity-src/src
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv17557
Modified Files:
TrackPanel.cpp
Log Message:
Fix selection redraw/logic bugs and rare segfault
Index: TrackPanel.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/TrackPanel.cpp,v
retrieving revision 1.330
retrieving revision 1.331
diff -u -d -r1.330 -r1.331
--- TrackPanel.cpp 5 Nov 2006 19:09:40 -0000 1.330
+++ TrackPanel.cpp 6 Nov 2006 11:18:38 -0000 1.331
@@ -1475,8 +1475,10 @@
// depending on the shift key. If not, cancel all selections.
if (t)
SelectionHandleClick(event, t, r, num);
- else
+ else {
SelectNone();
+ Refresh(false);
+ }
} else if (event.ButtonUp(1) || event.ButtonUp(3)) {
SetCapturedTrack( NULL );
@@ -1544,6 +1546,20 @@
mMouseCapture=IsSelecting;
if (event.ShiftDown()) {
+ // If the shift button is down and no track is selected yet,
+ // at least select the track we clicked into.
+ bool isAtLeastOneTrackSelected = false;
+
+ TrackListIterator iter(mTracks);
+ for (Track *t = iter.First(); t; t = iter.Next())
+ if (t->GetSelected()) {
+ isAtLeastOneTrackSelected = true;
+ break;
+ }
+
+ if (!isAtLeastOneTrackSelected)
+ pTrack->SetSelected(true);
+
// If the shift button is down, extend the current selection.
ExtendSelection(event.m_x, r.x);
return;
-------------------------------------------------------------------------
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