From df4f998231c5057795e42c37096586165e6a063c Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 3 May 2024 21:02:20 +0200 Subject: [PATCH] Arrangement DnD now defaults to move (not copy) --- gtk2_ardour/editor_sections.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/editor_sections.cc b/gtk2_ardour/editor_sections.cc index d8709e0430..9bf2b382d7 100644 --- a/gtk2_ardour/editor_sections.cc +++ b/gtk2_ardour/editor_sections.cc @@ -362,7 +362,14 @@ EditorSections::drag_motion (Glib::RefPtr const& context, int path.push_back (_model->children ().size () - 1); } - context->drag_status (context->get_suggested_action (), time); + Gdk::DragAction suggested_action = context->get_suggested_action (); + + /* default to move, unless the user hold ctrl */ + if (context->get_actions () & Gdk::ACTION_MOVE) { + suggested_action = Gdk::ACTION_MOVE; + } + + context->drag_status (suggested_action, time); _view.set_drag_dest_row (path, pos); _view.drag_highlight (); @@ -394,7 +401,7 @@ EditorSections::drag_data_received (Glib::RefPtr const& contex SectionOperation op = CopyPasteSection; timepos_t to (0); - if ((context->get_suggested_action () == Gdk::ACTION_MOVE)) { + if ((context->get_selected_action () == Gdk::ACTION_MOVE)) { op = CutPasteSection; }