diff --git a/QgisModelBaker/gui/topping_wizard/additives_page.py b/QgisModelBaker/gui/topping_wizard/additives_page.py index 66adf532e..fc9e88c8a 100644 --- a/QgisModelBaker/gui/topping_wizard/additives_page.py +++ b/QgisModelBaker/gui/topping_wizard/additives_page.py @@ -27,6 +27,8 @@ PAGE_UI = gui_utils.get_ui_class("topping_wizard/additives.ui") +VARIABLE_PREFIX_BLACKLIST = ["default_basket"] + class AdditivesPage(QWizardPage, PAGE_UI): def __init__(self, parent, title): @@ -56,19 +58,29 @@ def initializePage(self) -> None: maptheme_collection = QgsProject.instance().mapThemeCollection() self.mapthemes_model.setStringList(maptheme_collection.mapThemes()) self.mapthemes_model.check_all(Qt.Checked) - self.mapthemes_view.setEnabled(self.mapthemes_model.rowCount()) + self.mapthemes_view.setVisible(self.mapthemes_model.rowCount()) + self.mapthemes_label.setVisible(self.mapthemes_model.rowCount()) variables_keys = [] variables_keys = QgsProject.instance().customVariables().keys() + for blacklisted_prefix in VARIABLE_PREFIX_BLACKLIST: + variables_keys = [ + variable_key + for variable_key in variables_keys + if blacklisted_prefix not in variable_key + ] + self.variables_model.setStringList(variables_keys) self.variables_model.check_all(Qt.Checked) - self.mapthemes_view.setEnabled(self.variables_model.rowCount()) + self.variables_view.setVisible(self.variables_model.rowCount()) + self.variables_label.setVisible(self.variables_model.rowCount()) layout_manager = QgsProject.instance().layoutManager() layout_names = [layout.name() for layout in layout_manager.printLayouts()] self.layouts_model.setStringList(layout_names) self.layouts_model.check_all(Qt.Checked) - self.layouts_view.setEnabled(self.layouts_model.rowCount()) + self.layouts_view.setVisible(self.layouts_model.rowCount()) + self.layouts_label.setVisible(self.layouts_model.rowCount()) return super().initializePage() def validatePage(self) -> bool: diff --git a/QgisModelBaker/ui/topping_wizard/additives.ui b/QgisModelBaker/ui/topping_wizard/additives.ui index d2a7afde4..2ff003586 100644 --- a/QgisModelBaker/ui/topping_wizard/additives.ui +++ b/QgisModelBaker/ui/topping_wizard/additives.ui @@ -6,7 +6,7 @@ 0 0 - 800 + 1257 600 @@ -29,7 +29,7 @@ - Select the Map Themes that should be exported, as well as the custom project variables and the print layouts. + Additive project settings, that should be exported (if available). Like Map Themes, Custom Variables and Print Layouts. Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop diff --git a/scripts/package_pip_packages.sh b/scripts/package_pip_packages.sh index 64d4cd565..70fd812dc 100755 --- a/scripts/package_pip_packages.sh +++ b/scripts/package_pip_packages.sh @@ -1,7 +1,7 @@ #!/bin/bash LIBS_DIR="QgisModelBaker/libs" -MODELBAKER_LIBRARY=("modelbaker" "1.3.6") +MODELBAKER_LIBRARY=("modelbaker" "1.3.7") PACKAGING=("packaging" "21.3") PACKAGES=(