mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-21 12:55:57 +01:00
Emit a signal when Lua session script change (prepare UI update to un/set)
This commit is contained in:
parent
b066ad3164
commit
32fe5a083e
2 changed files with 8 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue