Skip to content

Commit

Permalink
keep layer tree export settings
Browse files Browse the repository at this point in the history
  • Loading branch information
signedav committed Dec 21, 2023
1 parent 8e3a304 commit efe7e20
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions QgisModelBaker/gui/topping_wizard/layers_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def __init__(self, layertree: QgsLayerTree, export_settings=ExportSettings()):
self.use_definition_nodes = {}
self.ili_schema_identificators = []

self.reload()
self.reload(True)

def columnCount(self, parent=None):
return len(LayerModel.Columns)
Expand Down Expand Up @@ -311,9 +311,10 @@ def check(self, index):
else:
self.setData(index, Qt.CheckStateRole, Qt.Checked)

def reload(self):
def reload(self, load_defaults=False):
self._load_ili_schema_identificators()
self._set_default_values()
if load_defaults:
self._set_default_values()

def _disable_children(self, parent: QModelIndex):
for child_row in range(self.rowCount(parent)):
Expand Down Expand Up @@ -553,7 +554,7 @@ def __init__(self, parent, title):

self.categories_dialog = LayerStyleCategoriesDialog()
self.stylecat_delegate.button_clicked.connect(self.open_categories_dialog)
self.reset_button.clicked.connect(self.layermodel.reload)
self.reset_button.clicked.connect(lambda: self.layermodel.reload(True))

def open_categories_dialog(self, index):
layername = index.data(int(Qt.DisplayRole))
Expand Down

0 comments on commit efe7e20

Please sign in to comment.