summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/mixer_ui.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc
index 470df1de08..348b23b57f 100644
--- a/gtk2_ardour/mixer_ui.cc
+++ b/gtk2_ardour/mixer_ui.cc
@@ -2538,6 +2538,16 @@ PluginTreeStore::row_drop_possible_vfunc(const Gtk::TreeModel::Path& dest, const
if (data.get_target() != "GTK_TREE_MODEL_ROW") {
return false;
}
+
+ // only allow to re-order top-level items
+ TreePath src;
+ if (TreePath::get_from_selection_data (data, src)) {
+ if (src.up() && src.up()) {
+ return false;
+ }
+ }
+
+ // don't allow to drop as child-rows.
Gtk::TreeModel::Path _dest = dest; // un const
const bool is_child = _dest.up (); // explicit bool for clang
if (!is_child || _dest.empty ()) {