diff options
author | aunsane <aunsane@gmail.com> | 2017-09-29 00:22:53 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2017-09-29 00:39:19 +0300 |
commit | 8d706b4ef942e01814f0a9db519aa32505b9abed (patch) | |
tree | ec3cd0464d4862f42041936958595c057abdfb78 /plugins/MirLua/src/mlua_options.cpp | |
parent | af9c3d7de7e35632d046575b5e4809a04abec816 (diff) |
MirLua: added service functions to execute lua code
version bump
Diffstat (limited to 'plugins/MirLua/src/mlua_options.cpp')
-rw-r--r-- | plugins/MirLua/src/mlua_options.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/MirLua/src/mlua_options.cpp b/plugins/MirLua/src/mlua_options.cpp index 65325e00dc..b4e11cb01d 100644 --- a/plugins/MirLua/src/mlua_options.cpp +++ b/plugins/MirLua/src/mlua_options.cpp @@ -121,7 +121,7 @@ void CMLuaOptions::OnScriptListClick(CCtrlListView::TEventInfo *evt) evt->treeviewctrl->GetItem(&lvi);
lvi.iSubItem = evt->nmlvia->iSubItem;
- CMLuaScript* script = (CMLuaScript*)lvi.lParam;
+ CMLuaScript *script = (CMLuaScript*)lvi.lParam;
switch (lvi.iSubItem)
{
@@ -130,9 +130,11 @@ void CMLuaOptions::OnScriptListClick(CCtrlListView::TEventInfo *evt) break;
case 2:
- //m_scripts.DeleteItem(evt->nmlvia->iItem);
- script->Unload();
+ lvi.lParam = (LPARAM)new CMLuaScript(*script);
+ delete script;
+ script = (CMLuaScript*)lvi.lParam;
script->Load();
+
lvi.mask = LVIF_IMAGE;
lvi.iSubItem = 0;
lvi.iImage = script->GetStatus() - 1;
|