Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix on DB Manager: Get db type from settings and read the settings accordingly #968

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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