Skip to content

Commit

Permalink
redirect click on table to header so correct selection behaviour happ…
Browse files Browse the repository at this point in the history
…ens (#84)
  • Loading branch information
gillins committed May 16, 2024
1 parent 1fc3317 commit 59141f4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tuiview/querywindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,14 @@ def wheelEvent(self, e):
if newpos < 0:
newpos = 0
self.parent.thematicScrollBar.setSliderPosition(newpos)

def mousePressEvent(self, e):
# yet another hack here because clicking on a row
# (not the vertical header) causes that row to be highlighted
# by Qt, but not by us. This means as we scroll the highlight
# doesn't get scrolled. So don't call the base class, but call
# the vertical header instead which does the right thing.
self.parent.thematicVerticalHeader.mousePressEvent(e)


class QueryDockWidget(QDockWidget):
Expand Down

0 comments on commit 59141f4

Please sign in to comment.