Skip to content

Commit

Permalink
improving the sync_layer_properties function
Browse files Browse the repository at this point in the history
  • Loading branch information
Gpetrak committed Nov 18, 2024
1 parent 1dc94ab commit 5721f8b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/qgis_geonode/gui/geonode_map_layer_config_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,13 @@ def sync_layer_properties(self):
# self.parent().parent()...
properties_dialog = self.find_parent_by_type(self, QtWidgets.QDialog)

# Sync GeoNode's SLD or / and metadata with the layer properties dialog
properties_dialog.syncToLayer()
if properties_dialog != None:
# Sync GeoNode's SLD or / and metadata with the layer properties dialog
properties_dialog.syncToLayer()
else:
self._show_message(
"The corresponding layer properties from GeoNode cannot be loaded correctly..."
)

def _toggle_link_controls(self, enabled: bool) -> None:
self.links_gb.setEnabled(enabled)
Expand Down

0 comments on commit 5721f8b

Please sign in to comment.