projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8243aeb
)
when considering whether or not to autoscroll teh canvas, first translate allocation...
author
Paul Davis
<paul@linuxaudiosystems.com>
Thu, 9 Feb 2017 15:27:16 +0000
(16:27 +0100)
committer
Paul Davis
<paul@linuxaudiosystems.com>
Thu, 9 Feb 2017 15:27:16 +0000
(16:27 +0100)
gtk2_ardour/editor_canvas.cc
patch
|
blob
|
history
diff --git
a/gtk2_ardour/editor_canvas.cc
b/gtk2_ardour/editor_canvas.cc
index f847a3f70722f329a84027ea7801a570a45cbedc..2a6230ad8d3330a44d6a60a34ea9fdd005de925e 100644
(file)
--- a/
gtk2_ardour/editor_canvas.cc
+++ b/
gtk2_ardour/editor_canvas.cc
@@
-512,6
+512,16
@@
Editor::maybe_autoscroll (bool allow_horiz, bool allow_vert, bool from_headers)
if (from_headers) {
alloc = controls_layout.get_allocation ();
if (from_headers) {
alloc = controls_layout.get_allocation ();
+
+ int wx, wy;
+
+ controls_layout.get_parent()->translate_coordinates (*toplevel,
+ alloc.get_x(), alloc.get_y(),
+ wx, wy);
+
+ scrolling_boundary = ArdourCanvas::Rect (wx, wy, wx + alloc.get_width(), wy + alloc.get_height());
+
+
} else {
alloc = _track_canvas_viewport->get_allocation ();
} else {
alloc = _track_canvas_viewport->get_allocation ();
@@
-542,9
+552,14
@@
Editor::maybe_autoscroll (bool allow_horiz, bool allow_vert, bool from_headers)
alloc.set_x (alloc.get_x() + 10);
}
alloc.set_x (alloc.get_x() + 10);
}
- }
+ int wx, wy;
- scrolling_boundary = ArdourCanvas::Rect (alloc.get_x(), alloc.get_y(), alloc.get_x() + alloc.get_width(), alloc.get_y() + alloc.get_height());
+ _track_canvas_viewport->get_parent()->translate_coordinates (*toplevel,
+ alloc.get_x(), alloc.get_y(),
+ wx, wy);
+
+ scrolling_boundary = ArdourCanvas::Rect (wx, wy, wx + alloc.get_width(), wy + alloc.get_height());
+ }
int x, y;
Gdk::ModifierType mask;
int x, y;
Gdk::ModifierType mask;