From 7e19053b88b4ab174052a44f2ee99dce92517aa9 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 15 Apr 2013 13:50:05 -0400 Subject: Fix dragging objects on the canvas and remove redundant canvas groups Delivery of fake motion events to the editor needed the event coordinates to be in canvas space, as they are with "real" events. Editor and other objects had many redundant groups from timbyr's work on gnomecanvas to scroll by moving groups. We don't need this anymore with cairo-canvas (though possibly a stationay background group for the canvas might be useful again one day as in the SAE logo. Its implementation would be fairly different though, since we would have to explicitly move the group on every scroll, since nothing else ever moves on scroll). Also tweaks to text item placement, and switch TimeAxisViewItem from name_pixbuf to name_text, since ArdourCanvas::Text is already "pixbuf optimized". --- gtk2_ardour/region_view.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gtk2_ardour/region_view.cc') diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc index 1b6ed3a6ff..2edad1cd16 100644 --- a/gtk2_ardour/region_view.cc +++ b/gtk2_ardour/region_view.cc @@ -183,9 +183,9 @@ RegionView::init (Gdk::Color const & basic_color, bool wfd) } } - if (name_pixbuf) { - name_pixbuf->set_data ("regionview", this); - name_pixbuf->Event.connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_region_view_name_event), name_pixbuf, this)); + if (name_text) { + name_text->set_data ("regionview", this); + name_text->Event.connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_region_view_name_event), name_text, this)); } if (wfd) { @@ -838,8 +838,8 @@ RegionView::update_coverage_frames (LayerDisplay d) name_highlight->raise_to_top (); } - if (name_pixbuf) { - name_pixbuf->raise_to_top (); + if (name_text) { + name_text->raise_to_top (); } } -- cgit v1.2.3