From a7192fcda638ca4495912123cc81a1be1d9cfc9d Mon Sep 17 00:00:00 2001 From: blacksun Date: Thu, 6 Nov 2014 21:08:45 +0000 Subject: [PATCH] bug fix: At project opening, simple element don't displayed the good text, but '_' if the text wasn't write in the element propertie dialog (only affect the text field tagged 'label') git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3460 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/qetgraphicsitem/element.h | 3 +-- sources/qetgraphicsitem/simpleelement.cpp | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/sources/qetgraphicsitem/element.h b/sources/qetgraphicsitem/element.h index 6fd3aa810..16ccbabf5 100644 --- a/sources/qetgraphicsitem/element.h +++ b/sources/qetgraphicsitem/element.h @@ -108,8 +108,7 @@ class Element : public QetGraphicsItem { virtual void linkToElement(Element *) {} virtual void unlinkAllElements() {} virtual void unlinkElement(Element *) {} - void initLink(QETProject *); - + virtual void initLink(QETProject *); QList linkedElements (); virtual int linkType() const {return link_type_;} // @return the linkable type void newUuid() {uuid_ = QUuid::createUuid();} //create new uuid for this element diff --git a/sources/qetgraphicsitem/simpleelement.cpp b/sources/qetgraphicsitem/simpleelement.cpp index 5ac098fa7..8ba0c597b 100644 --- a/sources/qetgraphicsitem/simpleelement.cpp +++ b/sources/qetgraphicsitem/simpleelement.cpp @@ -55,9 +55,7 @@ void SimpleElement::updateLabel() { bool show = elementInformations().keyMustShow("label"); // setup the label - (label.isEmpty() || !show)? - setTaggedText("label", "_", false): - setTaggedText("label", label, true); + if (!label.isEmpty() && show) setTaggedText("label", label, true); //Comment of element QString comment = elementInformations()["comment"].toString();