Skip to content

Commit

Permalink
Merge pull request #968 from opengisch/db-fix
Browse files Browse the repository at this point in the history
Fix on DB Manager: Get db type from settings and read the settings accordingly
  • Loading branch information
signedav authored Oct 10, 2024
2 parents a8f2cf1 + 79a9f7c commit e3d6387
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 e3d6387

Please sign in to comment.