Update of /cvsroot/audacity/audacity-src/src
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv24621/src
Modified Files:
Menus.cpp
Log Message:
This works around a problem where a selected region can be left scrolled off
the left of the screen. Somewhere the calculations are getting mucked up and
causes Fit To Selection to not quite zoom in enough to get the entire selected
region within the visible area. If playback occurs and the playback cursor get
to the end of the selected region, then the screen will scrolled and the
selected region will be off the left of the screen.
This "fix" is a complete hack as I was not able to track down exactly where the
miscalculation was, but it should work until we can track it down.
Index: Menus.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Menus.cpp,v
retrieving revision 1.479
retrieving revision 1.480
diff -u -d -r1.479 -r1.480
--- Menus.cpp 28 May 2009 04:57:59 -0000 1.479
+++ Menus.cpp 28 May 2009 07:09:40 -0000 1.480
@@ -4096,7 +4096,13 @@
if (mViewInfo.sel1 <= mViewInfo.sel0)
return;
- Zoom(mViewInfo.zoom * mViewInfo.screen / (mViewInfo.sel1 - mViewInfo.sel0));
+ // LL: The "-1" is just a hack to get around an issue where zooming to
+ // selection doesn't actually get the entire selected region within the
+ // visible area. This causes a problem with scrolling at end of
playback
+ // where the selected region may be scrolled off the left of the
screen.
+ // I know this isn't right, but until the real rounding or 1-off issue
is
+ // found, this will have to work.
+ Zoom(((mViewInfo.zoom * mViewInfo.screen) - 1) / (mViewInfo.sel1 -
mViewInfo.sel0));
TP_ScrollWindow(mViewInfo.sel0);
}
------------------------------------------------------------------------------
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