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

Add cancel button to setup wizard #1387

Merged
merged 4 commits into from
Oct 1, 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
10 changes: 2 additions & 8 deletions activity_browser/ui/wizards/project_setup_wizard.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import os
import ecoinvent_interface as ei
import bw2io as bi
import requests
from PySide2 import QtWidgets, QtCore

from activity_browser import project_settings
from activity_browser.bwutils.ecoinvent_biosphere_versions.ecospold2biosphereimporter import create_default_biosphere3
from activity_browser.ui.threading import ABThread
from activity_browser.mod import bw2data as bd
from activity_browser.mod.bw2io import ab_bw2setup
from activity_browser.mod.bw2io.ecoinvent import ab_import_ecoinvent_release
from activity_browser.utils import sort_semantic_versions
Expand All @@ -28,13 +23,15 @@ def __init__(self, parent=None):
self.setWizardStyle(self.ModernStyle)
self.setOption(self.NoCancelButtonOnLastPage)
self.setOption(self.NoBackButtonOnLastPage)
self.setOption(self.NoCancelButton, False)

# setting window options
self.setWindowTitle("Project Setup")
self.setWindowModality(QtCore.Qt.ApplicationModal)
self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
self.setWindowFlags(QtCore.Qt.Sheet)
self.setWindowFlag(QtCore.Qt.WindowContextHelpButtonHint, False)
self.setWindowFlag(QtCore.Qt.WindowCloseButtonHint, False)

# initializing and setting all pages
self.setPage(self.choose_setup, ChooseSetupPage(self))
Expand Down Expand Up @@ -244,9 +241,6 @@ def __init__(self, parent=None):
self.setLayout(layout)

def initializePage(self):
self.wizard().setWindowFlag(QtCore.Qt.WindowCloseButtonHint, False)
self.wizard().show()

self.wizard().button(QtWidgets.QWizard.BackButton).hide()

if self.wizard().type == "ecoinvent":
Expand Down
Loading