forked from mia/Aegisub
Remove progress dialogue and threaded call from Auto4 Lua export filter config dialogue production call. This somewhat breaks an undocumented part of the API but I don't think anything relies on this.
Should close #927. Originally committed to SVN as r3307.
This commit is contained in:
parent
049baecfc4
commit
174c17309b
1 changed files with 8 additions and 15 deletions
|
@ -732,23 +732,16 @@ namespace Automation4 {
|
||||||
// stored options
|
// stored options
|
||||||
lua_newtable(L); // TODO, nothing for now
|
lua_newtable(L); // TODO, nothing for now
|
||||||
|
|
||||||
LuaProgressSink *ps = new LuaProgressSink(L, 0, false);
|
|
||||||
ps->SetTitle(GetName());
|
|
||||||
|
|
||||||
// do call
|
// do call
|
||||||
LuaThreadedCall call(L, 2, 1);
|
int err = lua_pcall(L, 2, 1, 0);
|
||||||
|
if (err) {
|
||||||
ps->ShowModal();
|
wxString errmsg(lua_tostring(L, -1), wxConvUTF8);
|
||||||
wxThread::ExitCode code = call.Wait();
|
wxLogWarning(_T("Runtime error in Lua macro validation function:\n%s"), errmsg.c_str());
|
||||||
|
lua_pop(L, 1); // remove error message
|
||||||
delete ps;
|
|
||||||
|
|
||||||
|
|
||||||
if (!code) {
|
|
||||||
// The config dialog table should now be on stack as LuaConfigDialog constructor expects
|
|
||||||
return config_dialog = new LuaConfigDialog(L, false);
|
|
||||||
} else {
|
|
||||||
return config_dialog = 0;
|
return config_dialog = 0;
|
||||||
|
} else {
|
||||||
|
// Create config dialogue from table on top of stack
|
||||||
|
return config_dialog = new LuaConfigDialog(L, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue