Frequently when playing back a piece of music using the notation editor, the
position pointer will freeze and the scene itself begin scrolling. I suspect
this is not a design feature.
The position pointer should move horizontally across the view area of the scene
as a piece is being played. When the pointer reaches a right threshold of 85%
of the view area, the scrollbar is updated to shift the view area, leaving the
position pointer near a left threshold of 15% of the new view area. The
pointer then continues moving to the right until it again crosses the 85%
threshold, and the process continues.
It often happens, however, that the pointer finds itself somewhat to the left
of the 15% left threshold. This triggers an immediate update of the scrollbar,
leaving the pointer again to the left of the 15% threshold, which triggers an
immediate update of the scroll bar, etc., etc.
As view-area locations are specified by doubles and the scroll-bar location by
an integer, there will always be some slop when they interact. The easiest fix
is to provide a little room for the position pointer to overshoot the left
threshold without causing a problem.
Tim Munro
src/gui/widgets/Panned.cpp
void
Panned::slotEnsurePositionPointerInView(bool page)
{
Line 177: if (x < leftThreshold || ...
changed to
if (x < leftThreshold - 100 || ...
--- src/gui/widgets/Panned.cpp 2013-01-10 04:09:06.000000000 -0800
+++ src/gui/widgets/Panned.cpp 2013-03-26 08:16:09.130989921 -0700
@@ -174,7 +174,9 @@
// std::cerr << "x = " << x << ", left = " << left << ", leftThreshold = "
<< leftThreshold << ", right = " << right << ", rightThreshold = " <<
rightThreshold << std::endl;
// Is x inside the view?
- if (x < leftThreshold || (x > rightThreshold && x < right && page)) {
+// if (x < leftThreshold || (x > rightThreshold && x < right && page)) {
+ // Allow a little room for x to overshoot the left threshold when the
scrollbar is updated.
+ if (x < leftThreshold - 100 || (x > rightThreshold && x < right && page)) {
// std::cerr << "big scroll (x is off left, or paging)" << std::endl;
// scroll to have the left of the view, plus threshold, at x
value = hMin + (((x - ws * leftDist) - x1) * (hMax - hMin)) / (length
- ws);
------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel