Index: src/Project.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/Project.cpp,v retrieving revision 1.456 diff -u -r1.456 Project.cpp --- src/Project.cpp 30 Sep 2009 19:31:44 -0000 1.456 +++ src/Project.cpp 5 Oct 2009 05:51:46 -0000 @@ -1288,7 +1288,13 @@ // Add 1/4 of a screen of blank space to the end of the longest track mViewInfo.screen = ((double) panelWidth) / mViewInfo.zoom; - mViewInfo.total = mTracks->GetEndTime() + mViewInfo.screen / 4; + double newTotal = mTracks->GetEndTime() + mViewInfo.screen / 4; + + // Don't decrease total if the track panel doesn't want it. + if (newTotal > mViewInfo.total || !mTrackPanel->DoNotDecreaseTotalLength()) + { + mViewInfo.total = newTotal; + } if (mViewInfo.h > mViewInfo.total - mViewInfo.screen) { mViewInfo.h = mViewInfo.total - mViewInfo.screen; Index: src/TrackPanel.h =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/TrackPanel.h,v retrieving revision 1.140 diff -u -r1.140 TrackPanel.h --- src/TrackPanel.h 10 Sep 2009 06:28:25 -0000 1.140 +++ src/TrackPanel.h 5 Oct 2009 05:51:47 -0000 @@ -222,6 +222,10 @@ void UpdateTrackVRuler(Track *t); void UpdateVRulerSize(); + // Returns true if it would be inappropriate to decrease viewInfo.total due + // to current activity (during sliding is one case... there may be others) + bool DoNotDecreaseTotalLength() { return mMouseCapture == IsSliding; }; + private: #ifdef EXPERIMENTAL_MIXER_BOARD MixerBoard* GetMixerBoard();