diff options
author | Robin Gareus <robin@gareus.org> | 2015-04-30 17:58:33 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-04-30 17:58:33 +0200 |
commit | ae38128f88270df6ad24a0aa167adfc248276509 (patch) | |
tree | 6f8e29da167dd9580b5cb6550b610c0e6b36072e | |
parent | af884b41747ab959624ab85cff1da6963bf27bba (diff) |
session: add signal to indicate batch updates
…to tell the UI to not redraw.
-rw-r--r-- | libs/ardour/ardour/session.h | 5 | ||||
-rw-r--r-- | libs/ardour/session_process.cc | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 594b85f29c..c44adec501 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -183,6 +183,9 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop static PBD::Signal1<void,std::string> Dialog; + PBD::Signal0<void> BatchUpdateStart; + PBD::Signal0<void> BatchUpdateEnd; + int ensure_subdirs (); std::string automation_dir () const; ///< Automation data @@ -1272,7 +1275,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop void *do_work(); /* Signal Forwarding */ - void emit_route_signals () const; + void emit_route_signals (); void emit_thread_run (); static void *emit_thread (void *); void emit_thread_start (); diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index 6366abde71..404f06128f 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -1254,12 +1254,15 @@ Session::compute_stop_limit () const */ void -Session::emit_route_signals () const +Session::emit_route_signals () { + // TODO use RAII to allow using these signals in other places + BatchUpdateStart(); /* EMIT SIGNAL */ boost::shared_ptr<RouteList> r = routes.reader (); for (RouteList::const_iterator ci = r->begin(); ci != r->end(); ++ci) { (*ci)->emit_pending_signals (); } + BatchUpdateEnd(); /* EMIT SIGNAL */ } void |