From d17b6c5eead08d74d6fd6a631d0688d5bb2349ea Mon Sep 17 00:00:00 2001 From: Jan Lentfer Date: Sun, 19 Aug 2018 21:03:49 +0200 Subject: LCXL: save assignment of 8th fader in config --- libs/surfaces/launch_control_xl/gui.cc | 3 +-- libs/surfaces/launch_control_xl/launch_control_xl.cc | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/libs/surfaces/launch_control_xl/gui.cc b/libs/surfaces/launch_control_xl/gui.cc index dc5cc2901c..b4b5f95d36 100644 --- a/libs/surfaces/launch_control_xl/gui.cc +++ b/libs/surfaces/launch_control_xl/gui.cc @@ -127,8 +127,6 @@ LCXLGUI::LCXLGUI (LaunchControlXL& p) /* User Settings */ - fader8master_button.signal_clicked().connect (sigc::mem_fun (*this, &LCXLGUI::toggle_fader8master)); - l = manage (new Gtk::Label (_("Fader 8 Master"))); l->set_alignment (1.0, 0.5); table.attach (*l, 0, 1, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions (0)); @@ -137,6 +135,7 @@ LCXLGUI::LCXLGUI (LaunchControlXL& p) align->add (fader8master_button); table.attach (*align, 1, 2, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions (0),0,0); fader8master_button.set_active(lcxl.use_fader8master); + fader8master_button.signal_toggled().connect (sigc::mem_fun (*this, &LCXLGUI::toggle_fader8master)); row++; hpacker.pack_start (table, true, true); diff --git a/libs/surfaces/launch_control_xl/launch_control_xl.cc b/libs/surfaces/launch_control_xl/launch_control_xl.cc index fa12a9fe03..b542efe2fa 100644 --- a/libs/surfaces/launch_control_xl/launch_control_xl.cc +++ b/libs/surfaces/launch_control_xl/launch_control_xl.cc @@ -101,8 +101,6 @@ LaunchControlXL::LaunchControlXL (ARDOUR::Session& s) session->vca_manager().VCAAdded.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::stripables_added, this), lcxl); switch_bank (bank_start); - - set_fader8master(use_fader8master); } LaunchControlXL::~LaunchControlXL () @@ -150,6 +148,9 @@ LaunchControlXL::begin_using_device () in_use = true; + DEBUG_TRACE (DEBUG::LaunchControlXL, string_compose("use_fader8master inital value '%1'\n", use_fader8master)); + set_fader8master(use_fader8master); + return 0; } @@ -646,6 +647,10 @@ LaunchControlXL::get_state() child->add_child_nocopy (_async_out->get_state()); node.add_child_nocopy (*child); + child = new XMLNode (X_("Configuration")); + child->set_property ("fader8master", LaunchControlXL::use_fader8master); + node.add_child_nocopy (*child); + return node; } @@ -676,6 +681,11 @@ LaunchControlXL::set_state (const XMLNode & node, int version) } } + if ((child = node.child (X_("Configuration"))) !=0) { + /* this should propably become a for-loop at some point */ + child->get_property ("fader8master", use_fader8master); + } + return retval; } -- cgit v1.2.3