Skip to content

Commit

Permalink
Fixed Enum problems
Browse files Browse the repository at this point in the history
  • Loading branch information
mrvisscher committed Nov 19, 2024
1 parent 8df4a86 commit 55f19ec
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion activity_browser/layouts/tabs/LCA_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ def scenario_db_check(self, df: pd.DataFrame) -> pd.DataFrame:
# check for databases in the scenario dataframe that cannot be linked to
if unlinkable:
dialog = ScenarioDatabaseDialog.construct_dialog(self._parent, relink)
if dialog.exec_() == dialog.Accepted:
if dialog.exec_() == QtWidgets.QDialog.Accepted:
# TODO On update to bw2.5 this should be changed to use the bw2data.utils.get_node method
return scenario_replace_databases(df, dialog.relink)
# generate the required dialog
Expand Down
6 changes: 3 additions & 3 deletions activity_browser/ui/wizards/db_import_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(self, parent=None):
self.setWindowModality(QtCore.Qt.ApplicationModal)
self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
self.setWindowFlags(QtCore.Qt.Sheet)
self.setOption(self.NoCancelButton, False)
self.setOption(QtWidgets.QWizard.NoCancelButton, False)

# Construct and bind pages.
self.import_type_page = ImportTypePage(self)
Expand Down Expand Up @@ -708,7 +708,7 @@ def fix_db_import(self, missing: set) -> None:

options = [(db, list(bd.databases)) for db in missing]
linker = DatabaseLinkingDialog.relink_bw2package(options, self)
if linker.exec_() == DatabaseLinkingDialog.Accepted:
if linker.exec_() == QtWidgets.QDialog.Accepted:
self.relink_data = linker.links
else:
# If the user at any point did not accept their choice, fail.
Expand Down Expand Up @@ -736,7 +736,7 @@ def fix_excel_import(self, exchanges: list, missing: set) -> None:
# Iterate through the missing databases, asking user input.
options = [(db, list(bd.databases)) for db in missing]
linker = DatabaseLinkingDialog.relink_excel(options, self)
if linker.exec_() == DatabaseLinkingDialog.Accepted:
if linker.exec_() == QtWidgets.QDialog.Accepted:
self.relink_data = linker.links
else:
error = (
Expand Down
8 changes: 4 additions & 4 deletions activity_browser/ui/wizards/project_setup_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ def __init__(self, parent=None):
super().__init__(parent)

# setting wizard options
self.setWizardStyle(self.ModernStyle)
self.setOption(self.NoCancelButtonOnLastPage)
self.setOption(self.NoBackButtonOnLastPage)
self.setOption(self.NoCancelButton, False)
self.setWizardStyle(QtWidgets.QWizard.ModernStyle)
self.setOption(QtWidgets.QWizard.NoCancelButtonOnLastPage)
self.setOption(QtWidgets.QWizard.NoBackButtonOnLastPage)
self.setOption(QtWidgets.QWizard.NoCancelButton, False)

# setting window options
self.setWindowTitle("Project Setup")
Expand Down

0 comments on commit 55f19ec

Please sign in to comment.