From c3c13d510247406660437faebc5f31021252ccc8 Mon Sep 17 00:00:00 2001 From: Martin Marmsoler Date: Sat, 13 Mar 2021 18:09:52 +0100 Subject: [PATCH] store also terminal data when storing terminal. Was accidentaly removed in 5d3710c4b2db784e5cd6664e0cf1e454726934f2 --- sources/qetgraphicsitem/terminal.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sources/qetgraphicsitem/terminal.cpp b/sources/qetgraphicsitem/terminal.cpp index df85d4baa..a0e2b0c82 100644 --- a/sources/qetgraphicsitem/terminal.cpp +++ b/sources/qetgraphicsitem/terminal.cpp @@ -761,11 +761,18 @@ QList Terminal::conductors() const void Terminal::toXmlPriv(QDomElement &qdo) const { // for backward compatibility - qdo.setAttribute("x", QString("%1").arg(dock_elmt_.x())); - qdo.setAttribute("y", QString("%1").arg(dock_elmt_.y())); + qdo.setAttribute("number", number_terminal_); + qdo.setAttribute("nameHidden", name_terminal_hidden); // end for backward compatibility qdo.setAttribute("orientation", d->m_orientation); + + // Do not store terminal data in its own child + // Bad hack. The problem is that in the diagrams the terminal is described by the position and in the Collection by the dock. + QPointF tempPos = d->m_pos; + d->m_pos = dock_elmt_; + d->toXmlPriv(qdo); // TerminalData + d->m_pos = tempPos; } /**