diff options
-rw-r--r-- | libs/ardour/ardour/session.h | 2 | ||||
-rw-r--r-- | libs/ardour/session.cc | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 637412390e..dac899db5c 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -823,6 +823,8 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop uint32_t registered_lua_function_count () const { return _n_lua_scripts; } void scripts_changed (); // called from lua, updates _n_lua_scripts + PBD::Signal0<void> LuaScriptsChanged; + /* flattening stuff */ boost::shared_ptr<Region> write_one_track (Track&, framepos_t start, framepos_t end, diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index e28685d03f..8edc14300f 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -5271,6 +5271,9 @@ Session::register_lua_function ( tbl_arg[(*i)->name] = (*i)->value; } (*_lua_add)(name, bytecode, tbl_arg); // throws luabridge::LuaException + lm.release(); + + LuaScriptsChanged (); /* EMIT SIGNAL */ set_dirty(); } @@ -5280,6 +5283,9 @@ Session::unregister_lua_function (const std::string& name) Glib::Threads::Mutex::Lock lm (lua_lock); (*_lua_del)(name); // throws luabridge::LuaException lua.collect_garbage (); + lm.release(); + + LuaScriptsChanged (); /* EMIT SIGNAL */ set_dirty(); } |