Skip to content

Commit

Permalink
修复更新数据后,不自动更新图表
Browse files Browse the repository at this point in the history
  • Loading branch information
DancingSnow0517 committed May 14, 2023
1 parent 97879d2 commit d15a7c3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/star_rail_gacha/app/pages/home_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class UpdateThread(QThread):
stateTooltipSignal = pyqtSignal(str, str, bool)
updateButtonSignal = pyqtSignal(bool)
updateUidBoxSignal = pyqtSignal()
updateChartSignal = pyqtSignal()

def __init__(self, parent: 'HomePage' = ...) -> None:
super().__init__(parent)
Expand Down Expand Up @@ -90,6 +91,7 @@ def run(self) -> None:
self.updateButtonSignal.emit(True)
self.stateTooltipSignal.emit("数据更新完成!", "", False)
self.updateUidBoxSignal.emit()
self.updateChartSignal.emit()


class HomePage(QFrame):
Expand Down Expand Up @@ -313,6 +315,7 @@ def update_data(self):
update_thread.stateTooltipSignal.connect(self.__update_data_stateTooltip_signalReceive)
update_thread.updateButtonSignal.connect(self.__update_data_updateButton_signalReceive)
update_thread.updateUidBoxSignal.connect(self.update_uid_box)
update_thread.updateChartSignal.connect(self.update_chart)
update_thread.start()

def update_chart(self):
Expand Down

0 comments on commit d15a7c3

Please sign in to comment.