Bug 329070 - Different context menu for selection of multiple widgets
Summary: Different context menu for selection of multiple widgets
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Unclassified
Component: general (show other bugs)
Version: Git
Platform: unspecified Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Joris Steyn
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-21 10:33 UTC by Joris Steyn
Modified: 2013-12-22 19:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joris Steyn 2013-12-21 10:33:40 UTC
Some menu actions support a selection of multiple widgets (cut, copy, fill color) and others do not (delete, rename) - which is confusing.

Reproducible: Always

Steps to Reproduce:
1. Add two widgets on a diagram
2. Select one widget -> right click
3. Select multiple widgets -> right click
Actual Results:  
The same menu actions are shown in both cases.

Expected Results:  
The context menu of a multi-selection should only show actions that affect the whole selection. 

The context menu of a single widget should not show actions that only make sense on multiple widgets (align, bug 329069).

Slightly related: bug 57663.
Comment 1 Joris Steyn 2013-12-22 19:17:10 UTC
Git commit c4f4129e60b209b80484d674eca1adf3987ab310 by Joris Steyn.
Committed on 22/12/2013 at 17:11.
Pushed by jorissteyn into branch 'master'.

Show only menu actions applicable for selection

When multiple widgets are selected, a context menu is shown containing only the
actions that work on the whole selection.

The old implementation had a few features like changing the "show" options
on a classifier for multiple selected widgets and bulk-change classifiers to
interfaces. That code is removed now since it wasn't used in the first place
and it's problematic in both implementation and user interface.

Additional improvements:
 * fix bug where fonts and colors sometimes wont apply
 * fix bug where right-click on an unselected widget does not select the widget
 * allow cloning multiple widgets
 * remove double keyboard shortcuts for delete action

Also, checkable menu items should not be used in the context menu of multiple
widgets. There's no sane initial value if the widgets are set to a different
value. The only nice way to handle this is have one menu item for setting the option
and one for unsetting. This is done for the "Use fill color" checkbox.

M  +55   -53   umbrello/listpopupmenu.cpp
M  +8    -4    umbrello/listpopupmenu.h
M  +8    -26   umbrello/umlscene.cpp
M  +1    -2    umbrello/umlscene.h
M  +0    -10   umbrello/widgets/associationwidget.cpp
M  +0    -4    umbrello/widgets/umlwidget.cpp
M  +52   -65   umbrello/widgets/widgetbase.cpp
M  +0    -1    umbrello/widgets/widgetbase.h

http://commits.kde.org/umbrello/c4f4129e60b209b80484d674eca1adf3987ab310