diff options
Diffstat (limited to 'client/widgetbuilder.cc')
-rw-r--r-- | client/widgetbuilder.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/client/widgetbuilder.cc b/client/widgetbuilder.cc index 144b2a1..0c9f3b3 100644 --- a/client/widgetbuilder.cc +++ b/client/widgetbuilder.cc @@ -35,6 +35,11 @@ QVector< Widget* > widgetBuilder(QDomNode xml_node, QWidget *parent, QDomElement xml_elem = xml_node.toElement(); + if(xml_elem.hasAttribute("prefilled") && + xml_elem.attribute("prefilled") != "pracro") { + macrowindow->macroChanged(); + } + QWidget *widget = NULL; if(xml_elem.tagName() == "spacer") { if(parent && parent->layout()) { @@ -179,11 +184,13 @@ void setValues(QDomNode xml_node, MacroWindow *macrowindow) { QDomElement xml_elem = xml_node.toElement(); - if(xml_elem.tagName() == "item" || xml_elem.tagName() == "radiobutton") return; + if(xml_elem.tagName() == "item" || + xml_elem.tagName() == "radiobutton") return; if(xml_elem.hasAttribute("name") && xml_elem.hasAttribute("value")) { Widget *widget = macrowindow->getWidget(xml_elem.attribute("name")); - if(widget) widget->setValue(xml_elem.attribute("value"), xml_elem.attribute("prefilled", "")); + if(widget && widget->hasInitialValue() == false) // Don't set the value if it is already set indirectly (altcombobox) + widget->setValue(xml_elem.attribute("value"), xml_elem.attribute("prefilled", "")); } QDomNodeList children = xml_node.childNodes(); |