Skip to content

Commit

Permalink
Fix bug on clicking torrent files to select incase of large torrent
Browse files Browse the repository at this point in the history
  • Loading branch information
xoriole committed Jan 24, 2024
1 parent 60d66f3 commit 3be6b44
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from PyQt5.QtWidgets import QTableWidgetItem

Check warning on line 1 in scripts/application_tester/tribler_apptester/actions/change_download_files_action.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

scripts/application_tester/tribler_apptester/actions/change_download_files_action.py#L1

Unused QTableWidgetItem imported from PyQt5.QtWidgets

from tribler_apptester.action_sequence import ActionSequence
from tribler_apptester.actions.click_action import ClickAction
from tribler_apptester.actions.custom_action import CustomAction
Expand Down Expand Up @@ -36,6 +38,8 @@ def __init__(self):
if tree_view.rowCount() == 0:
exit_script()
item = tree_view.item(randint(0, tree_view.rowCount() - 1), 0)
if not item:
exit_script()
check_state = Qt.Checked if item.checkState() == Qt.Unchecked else Qt.Unchecked
item.setCheckState(check_state)
QMetaObject.invokeMethod(tree_view, "itemClicked", Q_ARG(QTableWidgetItem, item))
Expand Down

0 comments on commit 3be6b44

Please sign in to comment.