mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-28 13:49:58 +01:00
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
This commit is contained in:
@@ -52,41 +52,14 @@ void CompositeTextEditDialog::setUpComboBox()
|
|||||||
{
|
{
|
||||||
QStringList qstrl;
|
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" << "function" << "tension-protocol";
|
||||||
{
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qstrl = QETApp::elementInfoKeys();
|
qstrl = QETApp::elementInfoKeys();
|
||||||
|
qstrl.removeAll("formula");
|
||||||
}
|
}
|
||||||
|
|
||||||
//We use a QMap because the keys of the map are sorted, then no matter the curent local,
|
//We use a QMap because the keys of the map are sorted, then no matter the curent local,
|
||||||
|
|||||||
Reference in New Issue
Block a user