From a7d03731a21e5ba92226233a0c08f1aa8019b50b Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 18 May 2016 20:07:11 +0200 Subject: [PATCH] initialize snap-mode dropdown text "SnapOff" is the default, so no change is triggered when calling set_active() and initially the dropdown/ardour-button remains blank. --- gtk2_ardour/editor.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index edc1aa4478..5129a1ffaa 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -2329,10 +2329,16 @@ Editor::set_state (const XMLNode& node, int version) if ((prop = node.property ("snap-to"))) { snap_type_selection_done ((SnapType) string_2_enum (prop->value(), _snap_type)); + set_snap_to ((SnapType) string_2_enum (prop->value(), _snap_type)); } if ((prop = node.property ("snap-mode"))) { snap_mode_selection_done((SnapMode) string_2_enum (prop->value(), _snap_mode)); + /* set text of Dropdown. in case _snap_mode == SnapOff (default) + * snap_mode_selection_done() will only mark an already active item as active + * which does not trigger set_text(). + */ + set_snap_mode ((SnapMode) string_2_enum (prop->value(), _snap_mode)); } if ((prop = node.property ("internal-snap-to"))) {