Skip to content

Commit

Permalink
test: debug qt segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
kmnhan committed Nov 2, 2024
1 parent eed99c4 commit 50742f4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/erlab/interactive/imagetool/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,11 @@ def hoverEvent(self, ev) -> None:
else:
self.setMouseHover(False)

def _computeBoundingRect(self):
"""CursorLine debugging."""
_ = self.getViewBox().size()
super()._computeBoundingRect()


class ItoolCursorSpan(pg.LinearRegionItem):
def __init__(self, *args, **kargs) -> None:
Expand Down
5 changes: 5 additions & 0 deletions src/erlab/interactive/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1872,6 +1872,11 @@ def mouseDragEvent(self, ev) -> None:
if ev.isFinish():
self.moving = False

def _computeBoundingRect(self):
"""RotatableLine debugging."""
_ = self.getViewBox().size()
super()._computeBoundingRect()


def make_crosshairs(n: Literal[1, 2, 3] = 1) -> list[pg.TargetItem | RotatableLine]:
r"""Create a :class:`pyqtgraph.TargetItem` and associated `RotatableLine`\ s.
Expand Down

0 comments on commit 50742f4

Please sign in to comment.