[qet] qet/qet: [5329] dynamic element text item : "label" is not updated when report are unlinked, or when a folio is removed. |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 5329
Author: blacksun
Date: 2018-04-11 19:47:45 +0200 (Wed, 11 Apr 2018)
Log Message:
-----------
dynamic element text item : "label" is not updated when report are unlinked, or when a folio is removed.
Modified Paths:
--------------
trunk/sources/qetgraphicsitem/dynamicelementtextitem.cpp
Modified: trunk/sources/qetgraphicsitem/dynamicelementtextitem.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/dynamicelementtextitem.cpp 2018-04-10 19:27:25 UTC (rev 5328)
+++ trunk/sources/qetgraphicsitem/dynamicelementtextitem.cpp 2018-04-11 17:47:45 UTC (rev 5329)
@@ -882,7 +882,10 @@
}
if (other_diagram && (string.contains("%f") || string.contains("%id")))
+ {
connect(other_diagram->project(), &QETProject::projectDiagramsOrderChanged, this, &DynamicElementTextItem::updateReportText);
+ connect(other_diagram->project(), &QETProject::diagramRemoved, this, &DynamicElementTextItem::updateReportText);
+ }
if (string.contains("%l"))
connect(other_elmt, &Element::yChanged, this, &DynamicElementTextItem::updateReportText);
if (string.contains("%c"))
@@ -945,7 +948,10 @@
}
if (diagram && (formula.contains("%f") || formula.contains("%id")))
+ {
m_formula_connection << connect(diagram->project(), &QETProject::projectDiagramsOrderChanged, this, &DynamicElementTextItem::updateLabel);
+ m_formula_connection << connect(diagram->project(), &QETProject::diagramRemoved, this, &DynamicElementTextItem::updateLabel);
+ }
if (formula.contains("%l"))
m_formula_connection << connect(element, &Element::yChanged, this, &DynamicElementTextItem::updateLabel);
if (formula.contains("%c"))
@@ -979,6 +985,8 @@
{
if(!(m_parent_element.data()->linkType() & Element::AllReport))
return;
+ if(!m_other_report)
+ setPlainText("_");
if (m_text_from == ElementInfo && m_info_name == "label" && m_other_report)
{