From ccf4e1feb59bdc9a9e5f595bbf86d0297d075df9 Mon Sep 17 00:00:00 2001 From: Peery Date: Mon, 3 Jan 2022 20:25:26 +0100 Subject: [PATCH] Fixed Bug that kept image shown after changing root Renamed ArtNetManager.change_image() to ArtNetManager.refresh_shown_image() Added a refresh of image and config when changing root. --- ArtNet/artnet_manager.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ArtNet/artnet_manager.py b/ArtNet/artnet_manager.py index 0566271..e3ebf93 100644 --- a/ArtNet/artnet_manager.py +++ b/ArtNet/artnet_manager.py @@ -65,7 +65,7 @@ class ArtNetManager: def run(self): if len(self.all_images) > 0: self.curr_image_index = 0 - self.change_image() + self.refresh_shown_image() self.window.show() @@ -314,7 +314,7 @@ class ArtNetManager: else: return None - def change_image(self): + def refresh_shown_image(self): """ Refresh the image display to show the most current data according to the selected image :return: @@ -370,6 +370,9 @@ class ArtNetManager: print("Changing root to", path) self.config.data["file_root"] = path self.config.update_config() + self.__file_reader = FileReader(self.config.data["file_root"]) + self.update_all_images_list() + self.refresh_shown_image() def get_db_connection_details(self) -> dict: return self.config.data["db"]