Skip to content

Commit

Permalink
Address review on how to hide basket manager when doing an Import Dat…
Browse files Browse the repository at this point in the history
…a operation
  • Loading branch information
gacarrillor committed Jun 19, 2024
1 parent 6fac6c7 commit 62a644a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions QgisModelBaker/gui/dataset_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@


class DatasetManagerDialog(QDialog, DIALOG_UI):
def __init__(self, iface, parent=None, wizard_embedded=False):
def __init__(
self, iface, parent=None, wizard_embedded=False, basket_integration=True
):

QDialog.__init__(self, parent)
self.iface = iface
Expand Down Expand Up @@ -94,13 +96,13 @@ def __init__(self, iface, parent=None, wizard_embedded=False):
lambda: self._enable_dataset_handling(True)
)

if parent.objectName() == "InterlisImport":
if basket_integration:
self.basket_manager_button.clicked.connect(self._open_basket_manager)
else:
# While performing an Import Data operation,
# baskets should not be shown, since the operation
# will create a new basket for the chosen dataset.
self.basket_manager_button.setVisible(False)
else:
self.basket_manager_button.clicked.connect(self._open_basket_manager)

self.add_button.setIcon(QgsApplication.getThemeIcon("/symbologyAdd.svg"))
self.edit_button.setIcon(QgsApplication.getThemeIcon("/symbologyEdit.svg"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def _show_datasetmanager_dialog(self):
self.datasetmanager_dlg.reject()
else:
self.datasetmanager_dlg = DatasetManagerDialog(
self.workflow_wizard.iface, self, True
self.workflow_wizard.iface, self, True, False
)
self.datasetmanager_dlg.setAttribute(Qt.WA_DeleteOnClose)
self.datasetmanager_dlg.setWindowFlags(
Expand Down

0 comments on commit 62a644a

Please sign in to comment.