Skip to content

Commit

Permalink
It was a leftover from the previous functionality where the users hav…
Browse files Browse the repository at this point in the history
…e 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.
  • Loading branch information
signedav committed Oct 10, 2024
1 parent 8ca8117 commit 79a9f7c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions QgisModelBaker/gui/dataset_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 79a9f7c

Please sign in to comment.