From 317469ebffd29bd06838f41ba151321c3abca406 Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 19 Aug 2010 17:07:00 +0000 Subject: Fix initial validation due to the widgets being invisible. --- client/macrowindow.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/client/macrowindow.cc b/client/macrowindow.cc index 6e7249e..b10a6f0 100644 --- a/client/macrowindow.cc +++ b/client/macrowindow.cc @@ -129,7 +129,8 @@ void MacroWindow::initMacro(QDomNode &node) mainwidget = window; - mainwidget->setValues(); + // Moved to expandWrapper (validation bugfix) + // mainwidget->setValues(); if(waschanged == true) macroChanged(); @@ -226,6 +227,10 @@ void MacroWindow::expandWrapper() if(mainwidget) setExpandedWidget(mainwidget->qwidget()); expand(); + // Set values here, to be sure that the widgets are visible and thereby + // validate correctly. + mainwidget->setValues(); + // Set keyboard focus on the first focusable widget in the macro. QVector< Widget* > widgets; if(mainwidget) widgets = mainwidget->widgetList(true); @@ -303,7 +308,7 @@ void MacroWindow::setActive(bool active) void MacroWindow::clear() { - DEBUG(macrowindow, "clear %p\n", this); + // DEBUG(macrowindow, "clear %p\n", this); setExpandedWidget(NULL); if(mainwidget) delete mainwidget; -- cgit v1.2.3