summaryrefslogtreecommitdiff
path: root/client/widgets/widget.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/widgets/widget.cc')
-rw-r--r--client/widgets/widget.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/client/widgets/widget.cc b/client/widgets/widget.cc
index 0857d67..870fc4b 100644
--- a/client/widgets/widget.cc
+++ b/client/widgets/widget.cc
@@ -81,8 +81,11 @@ bool Widget::regexpValidator()
bool Widget::luaValidator()
{
if(!hasluaprogram) return true;
+
+ if(macrowindow->luaprograms.contains(luaprogram) == false) return false;
+ QString program = macrowindow->luaprograms.value(luaprogram);
- return macrowindow->lua->run(luaprogram, getName(), getValue());
+ return macrowindow->lua->runValidator(program, getName(), getValue());
}
void Widget::setInitialValue(QString value)