[umbrello-devel] [umbrello] [Bug 67062] Hypergraphic and hierarchy links
Oliver Kellogg
okellogg at users.sourceforge.net
Tue Jul 8 05:29:38 UTC 2014
https://bugs.kde.org/show_bug.cgi?id=67062
--- Comment #7 from Oliver Kellogg <okellogg at users.sourceforge.net> ---
Git commit 1258d81ab14cab51b85b8a5b96ef92eb484b1265 by Oliver Kellogg.
Committed on 08/07/2014 at 05:28.
Pushed by okellogg into branch 'master'.
(In reply to comment #6)
> [...]
> Proposed fix: Do the switchover to a new diagram on mouse button _release_
> not on _press_.
> Then, the release event could occur elsewhere than in the tree view; for
> example, on a note widget in the diagram area.
This would create behaviour that is not in line with the rest of Umbrello.
Rather than changing the press/release semantics, here is an implementation
for Copy from UMLListview and Paste onto NoteWidget in diagram:
umbrello/widgets/notewidget.h
- Add static NoteWidget *s_pCurrentNote.
Putting this here instead of in UMLApp to reduce coupling.
umbrello/clipboard/umldragdata.cpp
- In function decodeClip2(), call UMLDragData::decodeObjects() only if
NoteWidget::s_pCurrentNote is NULL.
- In function decodeViews() while-loop, if NoteWidget::s_pCurrentNote is non
NULL then extract attribute "xmi.id" from diagramElement and call
NoteWidget::s_pCurrentNote->setDiagramLink() with the extracted ID.
umbrello/clipboard/umlclipboard.cpp function pasteClip2()
- After call to UMLDragData::decodeClip2(), if NoteWidget::s_pCurrentNote is
non NULL then reset it to NULL instead of adding the views to the UMLDoc.
umbrello/listpopupmenu.cpp
- In ctor ListPopupMenu(QWidget*,WidgetBase*,bool,WidgetBase::WidgetType),
if object is a Note and UMLListView::startedCopy() is true then assign
object to NoteWidget::s_pCurrentNote and setActionEnabled(mt_Paste, true).
umbrello/widgets/notewidget.cpp
- In function setDiagramLink() add missing final call to update() for
display of new text.
M +9 -3 umbrello/clipboard/umlclipboard.cpp
M +15 -2 umbrello/clipboard/umldragdata.cpp
M +10 -1 umbrello/listpopupmenu.cpp
M +4 -5 umbrello/widgets/notewidget.cpp
M +2 -0 umbrello/widgets/notewidget.h
http://commits.kde.org/umbrello/1258d81ab14cab51b85b8a5b96ef92eb484b1265
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the umbrello-devel
mailing list