From 408c7c5b36e1058a76741a22876593ee8c042dd4 Mon Sep 17 00:00:00 2001 From: deva Date: Fri, 24 Jul 2009 13:59:36 +0000 Subject: Introduced a new template tag called 'header' to replace the macro-tag-with-header-attribute construct. --- client/mainwindow.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'client/mainwindow.cc') diff --git a/client/mainwindow.cc b/client/mainwindow.cc index 91d87a7..14ed60b 100644 --- a/client/mainwindow.cc +++ b/client/mainwindow.cc @@ -125,9 +125,12 @@ void MainWindow::update() QDomNodeList macronodes = coursenode.childNodes(); for(int j = 0; j < macronodes.count(); j++) { + QDomNode macronode = macronodes.at(j); QDomElement macroelement = macronode.toElement(); + // printf("%s\n", macroelement.tagName().toStdString().c_str()); + QString macroname = macroelement.attribute("name"); bool found = false; @@ -137,7 +140,8 @@ void MainWindow::update() i++; } - if(found == false || macroelement.hasAttribute("header")) { + // if(found == false || macroelement.hasAttribute("header")) { + if(found == false || macroelement.tagName() == "header") { QString num; num.sprintf("%04d", j); Macro macro(macronode); -- cgit v1.2.3