[Uml-devel] [Bug 126391] New: User interaction with UMLWidget improvements

Daniel Calviño Sánchez danxuliu at gmail.com
Fri Apr 28 00:06:03 UTC 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=126391         
           Summary: User interaction with UMLWidget improvements
           Product: umbrello
           Version: unspecified
          Platform: unspecified
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: wishlist
          Priority: NOR
         Component: general
        AssignedTo: umbrello-devel.kde.org
        ReportedBy: danxuliu gmail com


Version:           Latest SVN (using KDE KDE 3.4.2)
Installed from:    00

I thought that user interaction with UMLWidgets could be improved, so I made a patch for it. Here it is a description of what the patch mades:

New features:
-Move and resize can be cancelled.

-Move and resize can be constrained to X or Y axis using shift and control buttons when moving/resizing the widget.

-The widgets being moved are considered as a block, so if a widget in the selection is going beyond the limits of the canvas, the whole selection can't be moved further in that direction (before, it was only checked for individual widgets instead of selection as a whole)

-The way the widgets are adjusted to the grid was slightly changed. Now, they're adjusted using the upper left corner, instead of center or bottom right corner (depending on the code, the adjustment was made using one or other policy). This way, if component size is also adjusted to the grid, the widgets will fit completly in the grid, instead of being between some grid points.


Bugs fixed:
There were various little bugs in the old code, some of them minor as two double clicks over a widget made it to be deselected, and other more importants as not being able to resize ObjectWidgets. I have forget to document all the fixed bugs... but, well, there were some :) And I've possibly added new ones, however :P


Drawbacks:
-A lot more CPU charge than before (as selection limits are calculated in every move event).


Bugs:
-If a widget is being moved or resized but the cursor isn't over the widget (for example, if the movement is limited in an axis), new mouse release events aren't delivered to the widget, thus preventing movement cancel. However, the next release event over the widget will cancel the movement (as it didn't received the other).

It could be fixed if, in ToolbarStateArrow, when a widget received a press button event, the next release button is always for it, no matter over which widget the button was released (or if it was released in an empty space). However, to do this, the parent class ToolbarState should be modified to reflect this behaviour, and I don't know if it could have some side effects with other ToolbarStates.

-Select a note and a message widget, drag the note and cancel the move shows (only sometimes) a strange behaviour in the final position of the note. I've no idea of why it happens. May it be a problem related to ToolbarState and the way the events are delivered?

-Select a floating text of an association and another widget and drag the widget. The text is constrained badly (because constraining in FloatingTextWidgetController::moveWidgetBy is designed for square constraining instead of circular). It isn't very critical ;)




More information about the umbrello-devel mailing list