diff -r a4532e5c2ce3 -r 1c8ff1928b97 headingobj.cpp --- a/headingobj.cpp Mon Nov 20 12:12:05 2006 +0000 +++ b/headingobj.cpp Thu Nov 23 13:53:08 2006 +0000 @@ -18,12 +18,13 @@ HeadingObj::~HeadingObj() { - textline.clear(); +// cout << "Destr. HeadingObj "<boundingRect().height(); else h=2; - Q3CanvasText *t; ho=0; - for (t=textline.first(); t; t=textline.next() ) + for (int i=0; imove(x,y+ho); + textline.at(i)->move(x,y+ho); ho=ho+h; } } @@ -80,12 +80,11 @@ // then no selection would be visible, thus we prevent it in ::setText() if (!textline.isEmpty() ) { - Q3CanvasText *t; - for (t=textline.first(); t; t=textline.next() ) + for (int i=0; iboundingRect().height(); - if (wboundingRect().width() ) - w=t->boundingRect().width(); + h+=textline.at(i)->boundingRect().height(); + if (wboundingRect().width() ) + w=textline.at(i)->boundingRect().width(); } } bbox.setSize (QSize(w,h)); @@ -109,7 +108,8 @@ heading=s; // remove old textlines and prepare generating new ones - textline.clear(); + while (!textline.isEmpty()) + delete textline.takeFirst(); // prevent empty textline, so at least a small selection stays // visible for this heading @@ -220,9 +220,8 @@ if (color!=c) { color=c; - Q3CanvasText *t; - for (t=textline.first(); t; t=textline.next() ) - t->setColor(c); + for (int i=0; isetColor(c); } } @@ -234,12 +233,11 @@ void HeadingObj::setVisibility (bool v) { MapObj::setVisibility(v); - Q3CanvasText *t; - for (t=textline.first(); t; t=textline.next() ) + for (int i=0; ishow(); + textline.at(i)->show(); else - t->hide(); + textline.at(i)->hide(); } int HeadingObj::getHeight ()