From ea8ee983df2e4043e3c51c695ffc0ab108cbff14 Mon Sep 17 00:00:00 2001 From: scorpio810 Date: Wed, 7 Feb 2018 00:20:50 +0000 Subject: [PATCH] Fix crash if location text is so long (typo in code), thanks David666 to report it git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5231 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/qetgraphicsitem/element.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/qetgraphicsitem/element.cpp b/sources/qetgraphicsitem/element.cpp index d49d56b33..f14c29f39 100644 --- a/sources/qetgraphicsitem/element.cpp +++ b/sources/qetgraphicsitem/element.cpp @@ -696,7 +696,7 @@ bool Element::fromXml(QDomElement &e, QHash &table_id_adr, bool location_text->setTextFrom(DynamicElementTextItem::ElementInfo); location_text->setInfoName("location"); location_text->setFontSize(6); - if(comment_text->toPlainText().count() > 17) + if(location_text->toPlainText().count() > 17) location_text->setTextWidth(80); location_text->setPos(deti->x(), deti->y()+20); //+20 is arbitrary, location_text must be below deti and comment addDynamicTextItem(location_text);