Skip to content

Commit

Permalink
Plots: Enable panning with no auto fit and the scrollbars are visible
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 committed May 13, 2024
1 parent b1e5276 commit 1d9bcf4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion spyder/plugins/plots/widgets/figurebrowser.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,14 @@ def eventFilter(self, widget, event):
# ---- Panning
# Set ClosedHandCursor:
elif event.type() == QEvent.MouseButtonPress:
if event.button() == Qt.LeftButton:
if (
event.button() == Qt.LeftButton
and not self.auto_fit_plotting
and (
self.verticalScrollBar().isVisible()
or self.horizontalScrollBar().isVisible()
)
):
self.setCursor(Qt.ClosedHandCursor)
self._ispanning = True
self.xclick = event.globalX()
Expand Down

0 comments on commit 1d9bcf4

Please sign in to comment.