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.
This commit is contained in:
Robin Gareus 2022-06-15 02:33:11 +02:00
parent 5d10fd84eb
commit 2f02b809e7
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 2 additions and 1 deletions

View File

@ -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"));

View File

@ -22,9 +22,9 @@
namespace RouteDialogs {
enum InsertAt {
First,
BeforeSelection,
AfterSelection,
First,
Last
};