Bug 335399 - Instable position of activity pins
Summary: Instable position of activity pins
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 2.13.1
Platform: unspecified Linux
: NOR normal
Target Milestone: 2.14 (KDE Applications 4.14)
Assignee: Umbrello Development Group
Depends on:
Reported: 2014-05-27 06:56 UTC by Ralf Habacker
Modified: 2014-08-13 04:51 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.13.80


Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2014-05-27 06:56:01 UTC
Activities could have pin's  http://www.uml-diagrams.org/activity-diagrams-objects.html#pin

Reproducible: Always
Comment 1 Ralf Habacker 2014-05-27 06:58:09 UTC
On moving the actitivy widget the pins position is very unstable. Sometime it is displayed above the activity, sometime on the right side.
Comment 2 Oliver Kellogg 2014-05-29 21:07:24 UTC
(In reply to comment #1)
> On moving the activity widget the pins position is very unstable. Sometime
> it is displayed above the activity, sometime on the right side.

Perhaps the new PortWidget code might give some inspiration
(https://projects.kde.org/projects/kde/kdesdk/umbrello/repository/revisions/master/changes/umbrello/widgets/portwidget.cpp), and in particular the interplay with its owning ComponentWidget (sigCompMoved, slotCompMoved).

BTW, there seems to be some functional overlap between PinWidget and PortWidget.
I'll try to look at whether it is possible to factor their code into a common base class, or at least into a few utility methods.
Comment 3 Oliver Kellogg 2014-06-16 06:04:29 UTC
Git commit 17e9a7446d8faccdd1e039ea484a1dce686427dd by Oliver Kellogg.
Committed on 16/06/2014 at 06:04.
Pushed by okellogg into branch 'master'.

Completion of commit cd1979a - factoring of abstract base class from
PinWidget and PortWidget

- Factor new abstract base class PinPortBase from Portwidget and PinWidget.

- Inherit from PinPortBase instead of UMLWidget.

- New signal sigActMoved(diffX,diffY) is emitted when the activity widget is
  moved (cf. ComponentWidget::sigCompMoved).
- Reimplement UMLWidget virtual function moveWidgetBy() for adding emission
  of sigActMoved().

- In function createWidget(UMLScene*,UMLObject*) case ot_Port, call
  PinPortBase::attachToOwner() on the newly constructed PortWidget.
- In function makeWidgetFromXMI() case tag == "pinwidget", call
  PinPortBase::attachToOwner() on the newly constructed PinWidget.

- In function insertSingleSelectionMenu() case WidgetBase::wt_Pin add
  mt_NameAsTooltip. Set action checked if the object's floatingTextWidget()
  returns NULL.

- In function setupNewWidget() admit w->baseType() == WidgetBase::wt_Pin to
  call to PinPortBase::attachToOwner().

- Add widgets/pinportbase.cpp to libwidgets_SRCS.

A  +378  -0    umbrello/widgets/pinportbase.cpp     [License: GPL (v2+)]
A  +63   -0    umbrello/widgets/pinportbase.h     [License: GPL (v2+)]

Comment 4 Oliver Kellogg 2014-08-13 04:51:35 UTC
Git commit f830b0584a8f640e548cac994bba48e0afc5a32f by Oliver Kellogg.
Committed on 13/08/2014 at 04:52.
Pushed by okellogg into branch 'master'.

umbrello/widgets/floatingtextwidget.cpp function onWidget()
- On determining isWidgetChild activate test against WidgetBase::wt_Pin.
  This fixes the last known case of unselectable FloatingTextWidget.

M  +2    -2    umbrello/widgets/floatingtextwidget.cpp