diff options
| -rw-r--r-- | client/mainwindow.cc | 5 | 
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 ¯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())); | 
