Skip to content

The only downloader you need. 下载器的集大成者。

fix(task_card): 修复任务卡片点击打开文件功能

XiaoYouChR9a6969921392
diff --git a/app/components/task_card.py b/app/components/task_card.py
index b407362f..7b131003 100644
--- a/app/components/task_card.py
+++ b/app/components/task_card.py
@@ -279,8 +279,8 @@ class TaskCard(CardWidget, Ui_TaskCard):
event.accept()
def mouseReleaseEvent(self, e):
- if e.button() == Qt.LeftButton and self.isPressed:
- openFile(f"{self.filePath}/{self.fileName}")
+ if e.button() == Qt.LeftButton and self.isPressed and self.status == "finished":
+ openFile(f"{self.filePath}/{self.fileName}")
super().mouseReleaseEvent(e)
def changeButtonStatus(self, enabled:bool=None, icon=None, slot=None):