diff options
author | deva <deva> | 2010-06-10 07:03:06 +0000 |
---|---|---|
committer | deva <deva> | 2010-06-10 07:03:06 +0000 |
commit | 198b0d886817f2c5bc97cfd11857d4b314dffae3 (patch) | |
tree | 4fc2d51de46ab69b9e67149abf0ab6a332032f27 /client/macrowindow.cc | |
parent | 730eb796bbce6f124be9194f1565b7dda1daddf1 (diff) |
Add transaction support on database pr. pracro session. Makes it possible to discard all edited macros.
Diffstat (limited to 'client/macrowindow.cc')
-rw-r--r-- | client/macrowindow.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/client/macrowindow.cc b/client/macrowindow.cc index d9060b0..b37fe5f 100644 --- a/client/macrowindow.cc +++ b/client/macrowindow.cc @@ -93,7 +93,14 @@ void MacroWindow::initMacro(QDomNode &node) // Nothing to do here } else if(xml_elem.tagName() == "resume") { QString resume = xml_elem.text(); - ((ResumeWidget*)collapsedWidget())->setText(resume); + ResumeWidget::state_t state = ResumeWidget::OLD; + if(xml_elem.hasAttribute("state")) { + if(xml_elem.attribute("state") == "old") state = ResumeWidget::OLD; + if(xml_elem.attribute("state") == "new") state = ResumeWidget::NEW; + if(xml_elem.attribute("state") == "dirty") state = ResumeWidget::DIRTY; + } + + ((ResumeWidget*)collapsedWidget())->setText(resume, state); } else if(xml_elem.tagName() == "script") { if(xml_elem.hasAttribute("language") && |