Note that the clearing is not done on mouse press, but on mouse release.
The reason is that there are situations when multiple items are selected
and pressing the mouse on one of them should not clear the selection
(e.g., drag and drop of multiple items).
BUG: 290854
REVIEW: 103703
FIXED-IN: 4.8.0
(cherry picked from commit 9f711b5f2e)
When groups are enabled in Dolphin the key-up and key-down keys did not behave
consistent in comparison to traditional views or like done in editors.
CCBUG: 261995
CCBUG: 262038
- Open the context menu on the mouse-press event, not on the
mouse-release event.
- Provide an explicit position-information and don't use
QCursor::pos(). This fixes the issue that opening a context-menu
by the keyboard opens below the cursor.
- Provide different signals in the KItemListController for
the different context-menu types (item vs. view vs. header).
- Implement turning on/off roles by the header-context-menu.
If an item does not fit into the available width/height a scrollbar
should be provided (e.g. typically this represents the horizontal
scrollbar in the details-view where the width can be larger than
the than the visible width).
Currently the interaction with the scrollbar is not implemented but
this will be a quite minor task in comparison to this patch.
- Don't clear the selection on mouse-press events, do it (if
allowed) in the mouse-release-event. Otherwise dragging of
multiple selected items would not be possible.
- Don't clear the selection when the context-menu gets opened
by a right-click.
- Fix issue that dragging is not possible after the first
drop that has been canceled.
The old selection must be remembered before starting the rubberband
selection, otherwise it would not be possible anymore to deselect
items that have been selected by the rubberband itself.
This is just a rough draft: The rubberband gets visible and an
automatic scrolling is done if the autoscroll-margins have been
reached. However currently no items get selected yet. Currently
the autoscrolling has a severe bug if the scrollbars are manually
changed before or after a rubberband selection.
Dolphin 2.0 will get a new view-engine with the
following improvements:
- Better performance
- Animated transitions
- No clipped filenames due to dynamic item-sizes
- Grouping support for all view-modes
- Non-rectangular selection areas
- Simplified code for better maintenance
More details will be provided in a blog-entry during
the next days.
Please note that the code is in a very
early alpha-stage and although the most tricky parts
have been implemented already very basic things like
drag and drop or selections have not been pushed yet.
Those things are rather trivial to implement but this
still will take some time.