Skip to content

Commit 8b6c76e

Browse files
committed
Reload New Game on Table Refresh
1 parent fbe2010 commit 8b6c76e

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

steamCloudSaveDownloaderGUI/main_window.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,14 @@ def connect_signals(self):
4444
self.menu_bar.download_action.row_updated_signal.connect(self.table_widget.on_app_id_change)
4545
self.menu_bar.download_action.download_started_signal.connect(self.table_widget.download_started)
4646
self.menu_bar.download_action.download_complete_signal.connect(self.system_tray.download_complete)
47+
self.menu_bar.download_action.download_complete_signal.connect(self.table_widget.download_complete)
4748

4849
self.menu_bar.quit_action.quit_signal.connect(self.formal_quit)
4950

5051
self.menu_bar.downloader_timer.row_updated_signal.connect(self.table_widget.on_app_id_change)
5152
self.menu_bar.downloader_timer.download_started_signal.connect(self.table_widget.download_started)
5253
self.menu_bar.downloader_timer.download_complete_signal.connect(self.system_tray.download_complete)
54+
self.menu_bar.downloader_timer.download_complete_signal.connect(self.table_widget.download_complete)
5355

5456
self.system_tray.activated.connect(self.system_tray_activated)
5557
self.system_tray.show_signal.connect(self.show)

steamCloudSaveDownloaderGUI/table_widget.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,13 @@ def on_header_download_notify(self, p_int: int):
540540
def download_started(self):
541541
self.table_model.update_last_played()
542542

543+
@QtCore.Slot()
544+
def download_complete(self):
545+
db_data = data_provider.load_existing_from_db()
546+
if len(db_data) > len(self.table_model.raw_list):
547+
logger.debug("New games in DB. Reload table.")
548+
self.table_model.update_data(db_data)
549+
543550
@QtCore.Slot(list)
544551
def refresh(self):
545552
# Refresh

0 commit comments

Comments
 (0)