Skip to content

Commit

Permalink
STY: Add comment about middle-mouse paste fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nstelter-slac committed Sep 24, 2023
1 parent b87ae90 commit def59f3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pydm/widgets/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ def eventFilter(self, obj, event):
"""
# Override the eventFilter to capture all middle mouse button events,
# and show a tooltip if needed.
# We capture the release event (instead of press event) to prevent clipboard contents
# from getting paste into PyDMLineEdits, since paste happens at mouse release.
if event.type() == QEvent.MouseButtonRelease:
if event.button() == Qt.MiddleButton:
self.show_address_tooltip(event)
Expand Down

0 comments on commit def59f3

Please sign in to comment.