summaryrefslogtreecommitdiff
path: root/client/widgets/widget.cc
diff options
context:
space:
mode:
authordeva <deva>2009-08-06 13:41:25 +0000
committerdeva <deva>2009-08-06 13:41:25 +0000
commit11591030b43932140fc2e3d4cc922e58f8bb7c6d (patch)
treecf403a8e2062ed0064cb5e0be085bf50d3414362 /client/widgets/widget.cc
parente3fa5da963ba88b64b4aaf83ca53bb3d7aeb1f70 (diff)
Made macros with prefilled values commitable. Fixed bug, where innerwidget of altcombobox didn't get its value set.
Diffstat (limited to 'client/widgets/widget.cc')
-rw-r--r--client/widgets/widget.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/client/widgets/widget.cc b/client/widgets/widget.cc
index 14d8c34..5899839 100644
--- a/client/widgets/widget.cc
+++ b/client/widgets/widget.cc
@@ -41,6 +41,10 @@ Widget::Widget(QDomNode &node, MacroWindow *macrowindow)
elem.tagName().toStdString().c_str());
}
+ if(elem.hasAttribute("prefilled")) {
+ prefilled = elem.attribute("prefilled");
+ }
+
if(elem.hasAttribute("script")) {
luaprogram = elem.attribute("script");
hasluaprogram = true;
@@ -96,6 +100,12 @@ void Widget::setInitialValue(QString value)
}
}
+bool Widget::hasInitialValue()
+{
+ return has_initial_value;
+}
+
+
void Widget::reset()
{
setValue(initial_value);