Clear the selection in MousePressEvent() rather than MouseReleaseEvent()
This fixes the problem that clicking an unselected item in order to drag it would result in dragging all previously selected items as well. With this commit, previously selected items are unselected when a new item is clicked. The reason why clearing the selection was moved to MouseReleaseEvent() in commit b583dd6d was that clicking one of several selected items should not result in unselecting the other items (to make sure that dragging multiple items is possible). However, this can also be assured by just checking in MousePressEvent() if the clicked item has been selected already and not clearing the previous selection in that case. This applies equally to the case that a context menu is requested when several items are selected.
parent
f022a779
Please register or sign in to comment