Commit 95ba9362 authored by Ralf Habacker's avatar Ralf Habacker
Browse files

Fix 'No layout support for component diagrams'

Compared to other diagrams, component diagrams contain additional hidden
connections between port and components that must be considered by the
layout engine. These connections can be configured with the attributes
"visual::type::<typeA>::<typeB> and "ranking::type::<typeA>::<typeB>".

When positioning widgets, ports must be omitted because they are
positioned by the parent widget.

Followup for commit 81d2f1cd.

BUG:410121
FIXED-IN:2.28.90 (KDE Applications 19.07.80)
parent 6c00e987
......@@ -263,6 +263,8 @@ bool LayoutGenerator::apply(UMLScene *scene)
QString id = Uml::ID::toString(widget->localID());
if (!m_nodes.contains(id))
continue;
if (widget->isPortWidget() || widget->isPinWidget())
continue;
QPoint p = origin(id);
widget->setStartMovePosition(widget->pos());
widget->setX(p.x());
......
......@@ -87,7 +87,7 @@ type::default=shape=box
# for dot output
[X-UMBRELLO-Dot-Edges]
# for visual representation
visual::type::component::port=arrowhead=none,style=invis
visual::type::component::port=arrowhead=none,style=dotted
visual::type::anchor=arrowhead=none,style=dashed
visual::type::association=arrowhead=none
visual::type::dependency=arrowtail=vee,style=dashed,dir=back
......@@ -96,15 +96,15 @@ visual::type::uniassociation=arrowtail=vee,dir=back
visual::type::default=arrowhead=none
# for position ranking
ranking::type::component::port=minlen=0.0001,constraint=false
#ranking::type::anchor=weight=0.001
#ranking::type::association=weight=0.5
#ranking::type::anchor=weight=0.8
ranking::type::association=weight=0.8
ranking::type::dependency=weight=0.8
#ranking::type::realization=weight=0.8
#ranking::type::uniassociation=weight=0.5
ranking::type::realization=weight=0.8
ranking::type::uniassociation=weight=0.8
ranking::type::default=weight=0.001
[X-UMBRELLO-Dot-Attributes]
graph=splines=polyline,rankdir=TB,outputorder=nodesfirst,ranksep=0.5,nodesep=0.5
graph=splines=polyline,rankdir=LR,outputorder=nodesfirst,ranksep=0.5,nodesep=0.5
node=
edge=
......
......@@ -85,7 +85,7 @@ type::default=shape=box
# for dot output
[X-UMBRELLO-Dot-Edges]
# for visual representation
visual::type::component::port=arrowhead=none,style=invis
visual::type::component::port=arrowhead=none,style=dotted
visual::type::anchor=arrowhead=none,style=dashed
visual::type::association=arrowhead=none
visual::type::dependency=arrowtail=vee,style=dashed,dir=back
......@@ -93,12 +93,12 @@ visual::type::realization=arrowtail=normal,dir=back
visual::type::uniassociation=arrowtail=vee,dir=back
visual::type::default=arrowhead=none
# for position ranking
ranking::type::component::port=minlen=0.0001
#ranking::type::anchor=weight=0.001
#ranking::type::association=weight=0.5
ranking::type::component::port=minlen=0.0001,constraint=false
#ranking::type::anchor=weight=0.8
ranking::type::association=weight=0.8
ranking::type::dependency=weight=0.8
#ranking::type::realization=weight=0.8
#ranking::type::uniassociation=weight=0.5
ranking::type::realization=weight=0.8
ranking::type::uniassociation=weight=0.8
ranking::type::default=weight=0.001
[X-UMBRELLO-Dot-Attributes]
......
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