Commit 7a394913 authored by Ralf Habacker's avatar Ralf Habacker

Fix 'Vertical position of combined fragment widget else part is moved to the...

Fix 'Vertical position of combined fragment widget else part is moved to the vertical center after save/load cycle'

The location of a FloatingDashLineWidget instance should not be
reset when loading from an xmi file that the commit for bug 376804
did not cover.

Also on setting the y position of a FloatingDashLineWidget it is
required to have the minimum and maximum attributes already loaded.

BUG:390782
FIXED-IN:2.24.3 (KDE Applications 17.12.3)
parent 4000ba13
......@@ -463,7 +463,8 @@ bool CombinedFragmentWidget::activate(IDChangeLog *ChangeLog)
{
if(UMLWidget::activate(ChangeLog))
{
setDashLineGeometryAndPosition();
if (!UMLApp::app()->document()->loading())
setDashLineGeometryAndPosition();
return true;
}
return false;
......
......@@ -175,13 +175,14 @@ void FloatingDashLineWidget::saveToXMI1(QDomDocument & qDoc, QDomElement & qElem
*/
bool FloatingDashLineWidget::loadFromXMI1(QDomElement & qElement)
{
m_yMax = qElement.attribute(QLatin1String("maxY")).toFloat();
m_yMin = qElement.attribute(QLatin1String("minY")).toFloat();
m_Text = qElement.attribute(QLatin1String("text"));
if(!UMLWidget::loadFromXMI1(qElement)) {
return false;
}
DEBUG(DBG_SRC) << "load.......";
m_yMax = qElement.attribute(QLatin1String("maxY")).toInt();
m_yMin = qElement.attribute(QLatin1String("minY")).toInt();
m_Text = qElement.attribute(QLatin1String("text"));
return true;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment