summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeva <deva>2009-07-03 15:13:29 +0000
committerdeva <deva>2009-07-03 15:13:29 +0000
commitfd01a64841c534c699ace8a5315f3a40ee420455 (patch)
treeaa392842c58b2140dc4bef72b465172865f0e647
parent78d879227268ab70aac609f4d1fea37ec81c12c6 (diff)
Now headers work again.
-rw-r--r--client/mainwindow.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/client/mainwindow.cc b/client/mainwindow.cc
index 6a3e5d9..91d87a7 100644
--- a/client/mainwindow.cc
+++ b/client/mainwindow.cc
@@ -139,7 +139,7 @@ void MainWindow::update()
if(found == false || macroelement.hasAttribute("header")) {
QString num;
- num.sprintf("%4d", j);
+ num.sprintf("%04d", j);
Macro macro(macronode);
macros[num + macro.name] = macro;
}
@@ -148,7 +148,7 @@ void MainWindow::update()
Macros::iterator i = macros.begin();
while(i != macros.end()) {
- if(i->name == macroname) {
+ if(i->name == macroname && macroname != "") {
i->update(macronode);
}
i++;
@@ -163,6 +163,7 @@ void MainWindow::update()
Macro &macro = i.value();
macro.init((QBoxLayout*)w->layout(), macros, initialising, netcom, course);
if(macro.window != NULL) {
+ // Remove old connection (if any), to avoid multiple connections.
disconnect(macro.window, SIGNAL(updateOnCommit()), this, SLOT(update()));
connect(macro.window, SIGNAL(updateOnCommit()), this, SLOT(update()));