[umbrello-devel] [umbrello] [Bug 340724] Label position problem of copy and pasted synchronous messages
Ralf Habacker
ralf.habacker at freenet.de
Fri Nov 7 11:58:38 UTC 2014
https://bugs.kde.org/show_bug.cgi?id=340724
--- Comment #2 from Ralf Habacker <ralf.habacker at freenet.de> ---
(In reply to Ralf Habacker from comment #1)
> Inspecting the xmi file from a save of the test case shows that the labels
> shares the same localid
The problem is that in
bool UMLDragData::decodeClip4(const QMimeData* mimeData, UMLObjectList&
objects,
UMLWidgetList& widgets,
AssociationWidgetList& associations,
Uml::DiagramType::Enum &dType)
only top level widgets are be patched to get a new localid
// Generate a new unique 'local ID' so a second widget for the same
// UMLObject can be distinguished from the first widget
widget->setLocalID(
doc->assignNewID(widget->localID())
);
but in
bool MessageWidget::loadFromXMI(QDomElement& qElement)
...
QString tag = element.tagName();
if (tag == QLatin1String("floatingtext") || tag ==
QLatin1String("UML::FloatingTextWidget")) {
m_pFText = new FloatingTextWidget(m_scene, tr,
operationText(m_scene), m_textId);
m_scene->addFloatingTextWidget(m_pFText);
if(! m_pFText->loadFromXMI(element)) {
the related FloatingTextWidget fetches localid from the xml fragement
bool UMLWidget::loadFromXMI(QDomElement & qElement)
{
...
QString localid = qElement.attribute(QLatin1String("localid"),
QLatin1String("0"));
if (localid != QLatin1String("0")) {
m_nLocalID = Uml::ID::fromString(localid);
}
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the umbrello-devel
mailing list