From 79a9f7c82a6b8901c830438d90063665a5bfb3a9 Mon Sep 17 00:00:00 2001 From: signedav Date: Thu, 10 Oct 2024 13:14:04 +0200 Subject: [PATCH] It was a leftover from the previous functionality where the users have to select the db type. Meanwhile it's recognized from the current projecr or - in this case - recreated from the last used connection (read from the settings) there we need the stored db type and read it then according to it. --- QgisModelBaker/gui/dataset_manager.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/QgisModelBaker/gui/dataset_manager.py b/QgisModelBaker/gui/dataset_manager.py index f3532cb7..e05f5211 100644 --- a/QgisModelBaker/gui/dataset_manager.py +++ b/QgisModelBaker/gui/dataset_manager.py @@ -249,14 +249,12 @@ def _relevant_layer(self): def _restored_configuration(self): settings = QSettings() configuration = Ili2DbCommandConfiguration() - for db_id in self.db_simple_factory.get_db_list(False): - db_factory = self.db_simple_factory.create_factory(db_id) - config_manager = db_factory.get_db_command_config_manager(configuration) - config_manager.load_config_from_qsettings() - mode = settings.value("QgisModelBaker/importtype") mode = DbIliMode[mode] if mode else self.db_simple_factory.default_database mode = mode & ~DbIliMode.ili + db_factory = self.db_simple_factory.create_factory(mode) + config_manager = db_factory.get_db_command_config_manager(configuration) + config_manager.load_config_from_qsettings() configuration.tool = mode return configuration