[qet] [3460] bug fix: At project opening, simple element don' t displayed the good text, but '_' |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 3460
Author: blacksun
Date: 2014-11-06 22:08:45 +0100 (Thu, 06 Nov 2014)
Log Message:
-----------
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')
Modified Paths:
--------------
trunk/sources/qetgraphicsitem/element.h
trunk/sources/qetgraphicsitem/simpleelement.cpp
Modified: trunk/sources/qetgraphicsitem/element.h
===================================================================
--- trunk/sources/qetgraphicsitem/element.h 2014-11-06 16:55:38 UTC (rev 3459)
+++ trunk/sources/qetgraphicsitem/element.h 2014-11-06 21:08:45 UTC (rev 3460)
@@ -108,8 +108,7 @@
virtual void linkToElement(Element *) {}
virtual void unlinkAllElements() {}
virtual void unlinkElement(Element *) {}
- void initLink(QETProject *);
-
+ virtual void initLink(QETProject *);
QList<Element *> linkedElements ();
virtual int linkType() const {return link_type_;} // @return the linkable type
void newUuid() {uuid_ = QUuid::createUuid();} //create new uuid for this element
Modified: trunk/sources/qetgraphicsitem/simpleelement.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/simpleelement.cpp 2014-11-06 16:55:38 UTC (rev 3459)
+++ trunk/sources/qetgraphicsitem/simpleelement.cpp 2014-11-06 21:08:45 UTC (rev 3460)
@@ -55,9 +55,7 @@
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();