From bce0ee0fc72c5d5088d938041cefa706cb53f94d Mon Sep 17 00:00:00 2001 From: blacksun Date: Thu, 3 May 2018 09:33:30 +0000 Subject: [PATCH] Composite text dialog : The combobox propose every informations, not only these currently filled. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5350 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/ui/compositetexteditdialog.cpp | 33 +++----------------------- 1 file changed, 3 insertions(+), 30 deletions(-) diff --git a/sources/ui/compositetexteditdialog.cpp b/sources/ui/compositetexteditdialog.cpp index 613915a4d..4c68f2ca7 100644 --- a/sources/ui/compositetexteditdialog.cpp +++ b/sources/ui/compositetexteditdialog.cpp @@ -52,41 +52,14 @@ void CompositeTextEditDialog::setUpComboBox() { QStringList qstrl; - if(m_text) + if(m_text && (m_text->parentElement()->linkType() & Element::AllReport)) //Special treatment for text owned by a folio report { - if(m_text->parentElement()->linkType() & Element::AllReport) //Special treatment for text owned by a folio report - { - qstrl << "label"; - - if(!m_text->m_watched_conductor.isNull()) - { - Conductor *cond = m_text->m_watched_conductor.data(); - if (!cond->properties().m_function.isEmpty()) - qstrl << "function"; - if(!cond->properties().m_tension_protocol.isEmpty()) - qstrl << "tension-protocol"; - } - } - else - { - Element *elmt = m_text->elementUseForInfo(); - if(!elmt) - return; - - QStringList info_list = QETApp::elementInfoKeys(); - info_list.removeAll("formula"); //No need to have formula - DiagramContext dc = elmt->elementInformations(); - - for(QString info : info_list) - { - if(dc.contains(info)) - qstrl << info; - } - } + qstrl << "label" << "function" << "tension-protocol"; } else { qstrl = QETApp::elementInfoKeys(); + qstrl.removeAll("formula"); } //We use a QMap because the keys of the map are sorted, then no matter the curent local,