[qet] [3420] Element selector widget: minor improvement |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 3420
Author: blacksun
Date: 2014-10-30 14:57:54 +0100 (Thu, 30 Oct 2014)
Log Message:
-----------
Element selector widget: minor improvement
Modified Paths:
--------------
trunk/sources/ui/elementselectorwidget.cpp
Modified: trunk/sources/ui/elementselectorwidget.cpp
===================================================================
--- trunk/sources/ui/elementselectorwidget.cpp 2014-10-30 13:29:58 UTC (rev 3419)
+++ trunk/sources/ui/elementselectorwidget.cpp 2014-10-30 13:57:54 UTC (rev 3420)
@@ -109,10 +109,20 @@
foreach (Element *elmt, elements_list) {
//label for the button
QString button_text;
+
//if element is master and have label, add label to the string
+ //Also to comment
if (elmt->linkType() & Element::Master) {
- QString label = elmt->elementInformations()["label"].toString();
- if (!label.isEmpty()) button_text += (label + " ");
+ DiagramContext dc = elmt -> elementInformations();
+
+ if (!dc["label"].toString().isEmpty())
+ button_text = dc["label"].toString() + " ";
+
+ if (!dc["comment"].toString().isEmpty())
+ button_text += dc["comment"].toString();
+
+ if (!button_text.isEmpty())
+ button_text += "\n";
}
QString title = elmt->diagram()->title();