Skip to content

Commit

Permalink
please, be the last one :(
Browse files Browse the repository at this point in the history
  • Loading branch information
F-Bk committed Jul 24, 2024
1 parent 1a43831 commit 2a79855
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/asammdf/gui/widgets/test_BasePlotWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def move_item_inside_channels_tree_widget(self, plot=None, src=None, dst=None):
raise Exception("src and dst is cannot be None")

channels_tree_widget = src.treeWidget()
if channels_tree_widget.headerItem().sizeHint(0) == -1:
if channels_tree_widget.headerItem().sizeHint(0).height() == -1:
channels_tree_widget.headerItem().setSizeHint(0, QtCore.QSize(50, 25))
# height of header item
header_item_h = channels_tree_widget.headerItem().sizeHint(0).height()
Expand All @@ -116,7 +116,6 @@ def move_item_inside_channels_tree_widget(self, plot=None, src=None, dst=None):
channels_tree_widget.visualItemRect(dst).center().x(),
channels_tree_widget.visualItemRect(dst).center().y() + header_item_h + int(item_h * correction),
)
print(drag_y, drop_y, sep="\t\t")
QtTest.QTest.mouseMove(channels_tree_widget, QPoint(drag_x, drag_y))
# minimum necessary time for drag action to be implemented
t = 0.8
Expand All @@ -127,7 +126,7 @@ def call_drop_event(x, y, duration, h):

timer = td.Timer(0.0001, call_drop_event, args=(int(drag_x * 0.5), drop_y - drag_y, t, item_h))
timer.start()
self.manual_use(self.widget, duration=t + 0.2)
self.manual_use(self.widget, duration=t + 0.002)

def wheel_action(self, w: QWidget, x: float, y: float, angle_delta: int):
"""
Expand Down

0 comments on commit 2a79855

Please sign in to comment.