mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-27 00:47:43 +01:00
part II of probable fix for track sync-ordering
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3851 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
d5b1369258
commit
51f2a5fc4e
5 changed files with 9 additions and 6 deletions
|
|
@ -242,7 +242,7 @@ class Route : public IO
|
|||
sigc::signal<void> RemoteControlIDChanged;
|
||||
|
||||
void sync_order_keys ();
|
||||
static sigc::signal<void> SyncOrderKeys;
|
||||
static sigc::signal<void,void*> SyncOrderKeys;
|
||||
|
||||
protected:
|
||||
friend class Session;
|
||||
|
|
|
|||
|
|
@ -306,6 +306,8 @@ class Session : public PBD::StatefulDestructible
|
|||
bool operator() (boost::shared_ptr<Route>, boost::shared_ptr<Route> b);
|
||||
};
|
||||
|
||||
void sync_order_keys (void *src);
|
||||
|
||||
template<class T> void foreach_route (T *obj, void (T::*func)(Route&));
|
||||
template<class T> void foreach_route (T *obj, void (T::*func)(boost::shared_ptr<Route>));
|
||||
template<class T, class A> void foreach_route (T *obj, void (T::*func)(Route&, A), A arg);
|
||||
|
|
@ -1751,7 +1753,6 @@ class Session : public PBD::StatefulDestructible
|
|||
XMLNode& get_control_protocol_state ();
|
||||
|
||||
void set_history_depth (uint32_t depth);
|
||||
void sync_order_keys ();
|
||||
|
||||
static bool _disable_all_loaded_plugins;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ using namespace ARDOUR;
|
|||
using namespace PBD;
|
||||
|
||||
uint32_t Route::order_key_cnt = 0;
|
||||
sigc::signal<void> Route::SyncOrderKeys;
|
||||
sigc::signal<void,void*> Route::SyncOrderKeys;
|
||||
|
||||
Route::Route (Session& sess, string name, int input_min, int input_max, int output_min, int output_max, Flag flg, DataType default_type)
|
||||
: IO (sess, name, input_min, input_max, output_min, output_max, default_type),
|
||||
|
|
|
|||
|
|
@ -2153,6 +2153,8 @@ Session::remove_route (shared_ptr<Route> route)
|
|||
|
||||
route->drop_references ();
|
||||
|
||||
sync_order_keys (this);
|
||||
|
||||
/* save the new state of the world */
|
||||
|
||||
if (save_state (_current_snapshot_name)) {
|
||||
|
|
@ -4197,7 +4199,7 @@ Session::compute_initial_length ()
|
|||
}
|
||||
|
||||
void
|
||||
Session::sync_order_keys ()
|
||||
Session::sync_order_keys (void* src)
|
||||
{
|
||||
if (!Config->get_sync_all_route_ordering()) {
|
||||
/* leave order keys as they are */
|
||||
|
|
@ -4210,5 +4212,5 @@ Session::sync_order_keys ()
|
|||
(*i)->sync_order_keys ();
|
||||
}
|
||||
|
||||
Route::SyncOrderKeys (); // EMIT SIGNAL
|
||||
Route::SyncOrderKeys (src); // EMIT SIGNAL
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3345,7 +3345,7 @@ Session::config_changed (const char* parameter_name)
|
|||
} else if (PARAM_IS ("history-depth")) {
|
||||
set_history_depth (Config->get_history_depth());
|
||||
} else if (PARAM_IS ("sync-all-route-ordering")) {
|
||||
sync_order_keys ();
|
||||
sync_order_keys (0);
|
||||
}
|
||||
|
||||
set_dirty ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue