Further refactoring of drag code. Changes so that drags from the region list display...
[ardour.git] / libs / gtkmm2ext / gtkmm2ext / dndtreeview.h
index cc9d1c14635737e8073a244d3b9e9a16650284d7..5464920a59b89d6bea716d1f617d00af7cd492d7 100644 (file)
@@ -45,6 +45,11 @@ class DnDTreeViewBase : public Gtk::TreeView
 
        void add_drop_targets (std::list<Gtk::TargetEntry>&);
        void add_object_drag (int column, std::string type_name);
+
+       void on_drag_begin (Glib::RefPtr<Gdk::DragContext> const & context) {
+               Gtk::TreeView::on_drag_begin (context);
+               start_object_drag ();
+       }
        
        void on_drag_leave(const Glib::RefPtr<Gdk::DragContext>& context, guint time) {
                suggested_action = context->get_suggested_action();
@@ -95,8 +100,6 @@ class DnDTreeView : public DnDTreeViewBase
 
                } else if (selection_data.get_target() == object_type) {
 
-                       start_object_drag ();
-
                        /* we don't care about the data passed around by DnD, but
                           we have to provide something otherwise it will stop.
                         */