13
0

LT: unsuspending auto-connect does not necessarily mean "do auto connect"

This commit is contained in:
Paul Davis 2024-08-08 18:53:26 -06:00
parent 92fb9e4320
commit e9dd896f9a
2 changed files with 7 additions and 5 deletions

View File

@ -1425,14 +1425,15 @@ public:
PBD::Signal1<void,bool> VirtualSoundCheckChanged;
struct LivetraxAutoConnectSuspender {
LivetraxAutoConnectSuspender (Session& s) : session (s) { session.suspend_livetrax_auto_connect (); }
~LivetraxAutoConnectSuspender () { session.unsuspend_livetrax_auto_connect (); }
LivetraxAutoConnectSuspender (Session& s) : session (s), did_move (false) { session.suspend_livetrax_auto_connect (); }
~LivetraxAutoConnectSuspender () { session.unsuspend_livetrax_auto_connect (did_move); }
Session& session;
bool did_move;
};
void suspend_livetrax_auto_connect ();
void unsuspend_livetrax_auto_connect ();
void unsuspend_livetrax_auto_connect (bool with_action);
void update_track_numbers () { reassign_track_numbers (); }
protected:

View File

@ -4652,6 +4652,7 @@ Session::reassign_track_numbers ()
int64_t tn = 0;
int64_t bn = 0;
uint32_t trigger_order = 0;
RouteList r (*(routes.reader ()));
r.sort (Stripable::Sorter());
@ -7824,12 +7825,12 @@ Session::suspend_livetrax_auto_connect ()
}
void
Session::unsuspend_livetrax_auto_connect ()
Session::unsuspend_livetrax_auto_connect (bool with_action)
{
if (_no_livetrax_auto_connect) {
_no_livetrax_auto_connect--;
if (_no_livetrax_auto_connect == 0) {
if (_no_livetrax_auto_connect == 0 && with_action) {
reassign_track_numbers ();
}
}