mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Make selection and dragging behave more like other grid apps: drag only if already selected
This commit is contained in:
parent
3b1a1bace2
commit
eabbe6bc46
@ -551,8 +551,10 @@ class BooksView(QTableView): # {{{
|
||||
return mods & Qt.ControlModifier or mods & Qt.ShiftModifier
|
||||
|
||||
def mousePressEvent(self, event):
|
||||
if event.button() == Qt.LeftButton and not self.event_has_mods():
|
||||
self.drag_start_pos = event.pos()
|
||||
ep = event.pos()
|
||||
if self.indexAt(ep) in self.selectionModel().selectedIndexes() and \
|
||||
event.button() == Qt.LeftButton and not self.event_has_mods():
|
||||
self.drag_start_pos = ep
|
||||
return QTableView.mousePressEvent(self, event)
|
||||
|
||||
def mouseMoveEvent(self, event):
|
||||
|
Loading…
x
Reference in New Issue
Block a user