mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
Element selector widget: minor improvement
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3420 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -109,10 +109,20 @@ void ElementSelectorWidget::buildInterface() {
|
|||||||
foreach (Element *elmt, elements_list) {
|
foreach (Element *elmt, elements_list) {
|
||||||
//label for the button
|
//label for the button
|
||||||
QString button_text;
|
QString button_text;
|
||||||
|
|
||||||
//if element is master and have label, add label to the string
|
//if element is master and have label, add label to the string
|
||||||
|
//Also to comment
|
||||||
if (elmt->linkType() & Element::Master) {
|
if (elmt->linkType() & Element::Master) {
|
||||||
QString label = elmt->elementInformations()["label"].toString();
|
DiagramContext dc = elmt -> elementInformations();
|
||||||
if (!label.isEmpty()) button_text += (label + " ");
|
|
||||||
|
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();
|
QString title = elmt->diagram()->title();
|
||||||
|
|||||||
Reference in New Issue
Block a user