summaryrefslogtreecommitdiff
path: root/libs/canvas/scroll_group.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-05-22 23:05:18 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-06-03 16:12:00 -0400
commit54a56cd3c6b8d6ffaea3343c4f4a79b52c586661 (patch)
tree0af2fd7af2929cbad1df79d49d03497fc09f022b /libs/canvas/scroll_group.cc
parentf17b84ad10eef7249c49a0e9d94b259ddbb87345 (diff)
various changes to get independent scrolling to work better in canvas. mostly tweaks relating to how scroll offsets are used during rendering.
Event handling offsets still require work.
Diffstat (limited to 'libs/canvas/scroll_group.cc')
-rw-r--r--libs/canvas/scroll_group.cc19
1 files changed, 4 insertions, 15 deletions
diff --git a/libs/canvas/scroll_group.cc b/libs/canvas/scroll_group.cc
index 94ea869971..76bca50aee 100644
--- a/libs/canvas/scroll_group.cc
+++ b/libs/canvas/scroll_group.cc
@@ -17,6 +17,10 @@
*/
#include <iostream>
+
+#include "pbd/compose.h"
+
+#include "canvas/debug.h"
#include "canvas/scroll_group.h"
using namespace std;
@@ -37,26 +41,11 @@ ScrollGroup::ScrollGroup (Group* parent, Duple position, ScrollSensitivity s)
void
ScrollGroup::scroll_to (Duple const& d)
{
- /* get the nominal position of the group without scroll being in effect
- */
-
- Duple base_pos (_position.translate (_scroll_offset));
-
- /* compute a new position given our sensitivity to h- and v-scrolling
- */
-
if (_scroll_sensitivity & ScrollsHorizontally) {
- base_pos.x -= d.x;
_scroll_offset.x = d.x;
}
if (_scroll_sensitivity & ScrollsVertically) {
- base_pos.y -= d.y;
_scroll_offset.y = d.y;
}
-
- /* move there */
-
- set_position (base_pos);
}
-