From 2f02b809e729620df5494228daa7504a1d7c4cd9 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 15 Jun 2022 02:33:11 +0200 Subject: [PATCH] Fix save/restore of Insert-At position UIConfig insert-at-position saves/restores the enum as integer. This is used directly as parameter for insert_at_combo.set_active(). For this to work, the enum needs to match the order of elements in the dropdown. It would be preferable to register the enum, and map the dropdown entries, but for now this does the trick, without breaking existing UIConfigs. --- gtk2_ardour/add_route_dialog.cc | 1 + gtk2_ardour/route_dialogs.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/add_route_dialog.cc b/gtk2_ardour/add_route_dialog.cc index 744b3c78f6..894eebdda9 100644 --- a/gtk2_ardour/add_route_dialog.cc +++ b/gtk2_ardour/add_route_dialog.cc @@ -165,6 +165,7 @@ AddRouteDialog::AddRouteDialog () ); } + /* order needs to match enum InsertAt */ insert_at_combo.append (_("First")); insert_at_combo.append (_("Before Selection")); insert_at_combo.append (_("After Selection")); diff --git a/gtk2_ardour/route_dialogs.h b/gtk2_ardour/route_dialogs.h index 843da65551..848adbfc3a 100644 --- a/gtk2_ardour/route_dialogs.h +++ b/gtk2_ardour/route_dialogs.h @@ -22,9 +22,9 @@ namespace RouteDialogs { enum InsertAt { + First, BeforeSelection, AfterSelection, - First, Last };