diff options
author | Johannes Mueller <github@johannes-mueller.org> | 2020-03-30 21:49:57 +0200 |
---|---|---|
committer | Johannes Mueller <github@johannes-mueller.org> | 2020-03-31 09:01:59 +0200 |
commit | 5774be46fe5dc7e877fa50ef709a16f8ed621c2f (patch) | |
tree | 392b783c6bb41bf467b6fcfe27daff4416fac2a7 /gtk2_ardour/add_route_dialog.h | |
parent | bd92e290c09665c1813c670e33432c36a967777f (diff) |
Remember the route count when route lua template sets it by "how_many"
If the user has an audio interface with 32 inputs, there is the danger, that
they click through the route template list and hit "Generic Audio Track" which
then sets the number of routes to be added to 32. When they click back to
e.g. "Audio Tracks" this number remains at 32. So they will accidentally add 32
audio tracks although they wanted just one. Somewhat inconvenient.
By this commit we remember the number of routes to be added, when it is set by
a lua template and thus can set it back when the user clicks back on a route
type that does not set it.
Diffstat (limited to 'gtk2_ardour/add_route_dialog.h')
-rw-r--r-- | gtk2_ardour/add_route_dialog.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk2_ardour/add_route_dialog.h b/gtk2_ardour/add_route_dialog.h index 053395562b..298577496b 100644 --- a/gtk2_ardour/add_route_dialog.h +++ b/gtk2_ardour/add_route_dialog.h @@ -141,8 +141,8 @@ private: TrackTemplateColumns track_template_columns; - Glib::RefPtr<Gtk::TreeStore> trk_template_model; - Gtk::TreeView trk_template_chooser; + Glib::RefPtr<Gtk::TreeStore> trk_template_model; + Gtk::TreeView trk_template_chooser; void trk_template_row_selected (); @@ -163,6 +163,9 @@ private: typedef std::vector<ChannelSetup> ChannelSetups; ChannelSetups channel_setups; + int last_route_count; + bool route_count_set_by_template; + static std::vector<std::pair<std::string, std::string> > builtin_types; static std::vector<std::string> channel_combo_strings; static std::vector<std::string> bus_mode_strings; |