Skip to content

Commit

Permalink
Merge pull request #544 from opengisch/fixtypo
Browse files Browse the repository at this point in the history
fix typo seletion (instead of selection) in variable and classnames
  • Loading branch information
signedav committed Sep 10, 2021
2 parents 3b1329a + 1f7718a commit 7da824d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
PAGE_UI = ui.get_ui_class("workflow_wizard/import_source_selection.ui")


class ImportSourceSeletionPage(QWizardPage, PAGE_UI):
class ImportSourceSelectionPage(QWizardPage, PAGE_UI):

ValidExtensions = wizard_tools.IliExtensions + wizard_tools.TransferExtensions

Expand Down
4 changes: 2 additions & 2 deletions QgisModelBaker/gui/workflow_wizard/intro_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self, parent, title):

self.setTitle(title)

self.next_id = wizard_tools.PageIds.ImportSourceSeletion
self.next_id = wizard_tools.PageIds.ImportSourceSelection
self.import_button.clicked.connect(self._on_import)
self.generate_button.clicked.connect(self._on_generate)
self.export_button.clicked.connect(self._on_export)
Expand All @@ -47,7 +47,7 @@ def nextId(self):
return self.next_id

def _on_import(self):
self.next_id = wizard_tools.PageIds.ImportSourceSeletion
self.next_id = wizard_tools.PageIds.ImportSourceSelection
self.workflow_wizard.next()

def _on_generate(self):
Expand Down
2 changes: 1 addition & 1 deletion QgisModelBaker/gui/workflow_wizard/wizard_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

class PageIds:
Intro = 1
ImportSourceSeletion = 2
ImportSourceSelection = 2
ImportDatabaseSelection = 3
GenerateDatabaseSelection = 4
ImportSchemaConfiguration = 5
Expand Down
42 changes: 21 additions & 21 deletions QgisModelBaker/gui/workflow_wizard/workflow_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
ImportSchemaConfigurationPage,
)
from QgisModelBaker.gui.workflow_wizard.import_source_selection_page import (
ImportSourceSeletionPage,
ImportSourceSelectionPage,
)
from QgisModelBaker.gui.workflow_wizard.intro_page import IntroPage
from QgisModelBaker.gui.workflow_wizard.project_creation_page import ProjectCreationPage
Expand Down Expand Up @@ -110,10 +110,10 @@ def __init__(self, iface, base_config, parent):

# pages setup
self.intro_page = IntroPage(self, self._current_page_title(PageIds.Intro))
self.source_seletion_page = ImportSourceSeletionPage(
self, self._current_page_title(PageIds.ImportSourceSeletion)
self.source_selection_page = ImportSourceSelectionPage(
self, self._current_page_title(PageIds.ImportSourceSelection)
)
self.import_database_seletion_page = DatabaseSelectionPage(
self.import_database_selection_page = DatabaseSelectionPage(
self,
self._current_page_title(PageIds.ImportDatabaseSelection),
DbActionType.IMPORT_DATA,
Expand All @@ -137,12 +137,12 @@ def __init__(self, iface, base_config, parent):
self.project_creation_page = ProjectCreationPage(
self, self._current_page_title(PageIds.ProjectCreation)
)
self.generate_database_seletion_page = DatabaseSelectionPage(
self.generate_database_selection_page = DatabaseSelectionPage(
self,
self._current_page_title(PageIds.GenerateDatabaseSelection),
DbActionType.GENERATE,
)
self.export_database_seletion_page = DatabaseSelectionPage(
self.export_database_selection_page = DatabaseSelectionPage(
self,
self._current_page_title(PageIds.ExportDatabaseSelection),
DbActionType.EXPORT,
Expand All @@ -156,20 +156,20 @@ def __init__(self, iface, base_config, parent):
DbActionType.EXPORT,
)
self.setPage(PageIds.Intro, self.intro_page)
self.setPage(PageIds.ImportSourceSeletion, self.source_seletion_page)
self.setPage(PageIds.ImportSourceSelection, self.source_selection_page)
self.setPage(
PageIds.ImportDatabaseSelection, self.import_database_seletion_page
PageIds.ImportDatabaseSelection, self.import_database_selection_page
)
self.setPage(PageIds.ImportSchemaConfiguration, self.schema_configuration_page)
self.setPage(PageIds.ImportSchemaExecution, self.import_schema_execution_page)
self.setPage(PageIds.ImportDataConfiguration, self.data_configuration_page)
self.setPage(PageIds.ImportDataExecution, self.import_data_execution_page)
self.setPage(PageIds.ProjectCreation, self.project_creation_page)
self.setPage(
PageIds.GenerateDatabaseSelection, self.generate_database_seletion_page
PageIds.GenerateDatabaseSelection, self.generate_database_selection_page
)
self.setPage(
PageIds.ExportDatabaseSelection, self.export_database_seletion_page
PageIds.ExportDatabaseSelection, self.export_database_selection_page
)
self.setPage(
PageIds.ExportDataConfiguration, self.export_data_configuration_page
Expand All @@ -181,12 +181,12 @@ def __init__(self, iface, base_config, parent):
def next_id(self):
# this is called on the nextId overrides of the pages - so after the next-button is pressed
# it finalizes the edits on the current page and returns the evaluated id of the next page
if self.current_id == PageIds.ImportSourceSeletion:
if self.current_id == PageIds.ImportSourceSelection:
return PageIds.ImportDatabaseSelection

if self.current_id == PageIds.ImportDatabaseSelection:
if self.import_database_seletion_page.is_valid():
self._update_configurations(self.import_database_seletion_page)
if self.import_database_selection_page.is_valid():
self._update_configurations(self.import_database_selection_page)
if self.refresh_import_models(True):
# when there are models to import, we go to the configuration page for schema import
return PageIds.ImportSchemaConfiguration
Expand All @@ -196,8 +196,8 @@ def next_id(self):
return PageIds.ProjectCreation

if self.current_id == PageIds.GenerateDatabaseSelection:
if self.generate_database_seletion_page.is_valid():
self._update_configurations(self.generate_database_seletion_page)
if self.generate_database_selection_page.is_valid():
self._update_configurations(self.generate_database_selection_page)
if self._db_or_schema_exists(self.import_schema_configuration):
return PageIds.ProjectCreation
else:
Expand All @@ -206,8 +206,8 @@ def next_id(self):
)

if self.current_id == PageIds.ExportDatabaseSelection:
if self.export_database_seletion_page.is_valid():
self._update_configurations(self.export_database_seletion_page)
if self.export_database_selection_page.is_valid():
self._update_configurations(self.export_database_selection_page)
if self._db_or_schema_exists(self.export_data_configuration):
return PageIds.ExportDataConfiguration
else:
Expand Down Expand Up @@ -251,17 +251,17 @@ def id_changed(self, new_id):

if self.current_id == PageIds.ImportDatabaseSelection:
# use schema config to restore
self.import_database_seletion_page.restore_configuration(
self.import_database_selection_page.restore_configuration(
self.import_schema_configuration
)

if self.current_id == PageIds.GenerateDatabaseSelection:
self.generate_database_seletion_page.restore_configuration(
self.generate_database_selection_page.restore_configuration(
self.import_schema_configuration
)

if self.current_id == PageIds.ExportDatabaseSelection:
self.export_database_seletion_page.restore_configuration(
self.export_database_selection_page.restore_configuration(
self.export_data_configuration
)

Expand Down Expand Up @@ -323,7 +323,7 @@ def _update_configurations(self, page):
page.save_configuration(self.import_schema_configuration)

def _current_page_title(self, id):
if id == PageIds.ImportSourceSeletion:
if id == PageIds.ImportSourceSelection:
return self.tr("Source Selection")
elif id == PageIds.ImportDatabaseSelection:
return self.tr("Database Configuration")
Expand Down

0 comments on commit 7da824d

Please sign in to comment.