Skip to content

Commit

Permalink
BUG(MultiAxisPlot): make resize callback asynchronous
Browse files Browse the repository at this point in the history
This prevents an infinite recursion in pyqtgraph 0.13.4, in which
view.setGeometry emits a sigResized, which gets Qt.DirectConection
to the callback that calls view.setGeometry.

Signed-off-by: Sofia Ferreira (flowln) <[email protected]>
  • Loading branch information
flowln committed Apr 8, 2024
1 parent abdaa14 commit c542d71
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pydm/widgets/multi_axis_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from collections import Counter
from pyqtgraph import AxisItem, PlotDataItem, PlotItem, ViewBox
from typing import List, Optional
from qtpy.QtCore import Qt
from .multi_axis_viewbox import MultiAxisViewBox
from .multi_axis_viewbox_menu import MultiAxisViewBoxMenu
from ..utilities import is_qt_designer
Expand Down Expand Up @@ -36,7 +37,7 @@ def __init__(self, parent=None, axisItems=None, **kargs):
# in order to support multiple axes on the same plot. This set will remain empty if the plot has only
# one set of axes
self.stackedViews = weakref.WeakSet()
viewBox.sigResized.connect(self.updateStackedViews)
viewBox.sigResized.connect(self.updateStackedViews, Qt.QueuedConnection)

# Signals that will be emitted when mouse wheel or mouse drag events happen
self.vb.sigMouseDragged.connect(self.handleMouseDragEvent)
Expand Down

0 comments on commit c542d71

Please sign in to comment.