From fd01a64841c534c699ace8a5315f3a40ee420455 Mon Sep 17 00:00:00 2001 From: deva Date: Fri, 3 Jul 2009 15:13:29 +0000 Subject: Now headers work again. --- client/mainwindow.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'client') 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 ¯o = 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())); -- cgit v1.2.3