diff options
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;
|