Skip to content

Commit

Permalink
Fixed problems with QGIS 3.34
Browse files Browse the repository at this point in the history
  • Loading branch information
icgcaadell committed Sep 3, 2024
1 parent cfa220e commit 9e66af3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
1 change: 1 addition & 0 deletions metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ changelog=v1.1.20 (2024-09-02)
- Fixed problem showing photograms with undefined GSD value
- Fixed problem showing photogram's metadatas and raster
- Fixed problem showing anaglyph dialog when there aren't loaded anaglyph layers
- Fixed problems with QGIS v3.34

v1.1.19 (2024-05-06)
- Added gpkg 3d download format for product Territorial topographic referential
Expand Down
2 changes: 1 addition & 1 deletion qlib3/base/anaglyphdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def set_enabled(self, enable=True):

def set_anaglyph(self, parallax, inverted_stereo):
""" Assigna valors a les opcions del diàleg """
self.horizontalSlider_parallax.setValue((parallax - 80) / 4)
self.horizontalSlider_parallax.setValue(int((parallax - 80) / 4))
self.checkBox_inverted_stereo.setChecked(Qt.Checked if inverted_stereo else Qt.Unchecked)

def get_parallax(self):
Expand Down
14 changes: 6 additions & 8 deletions qlib3/base/pluginbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -3912,16 +3912,13 @@ def add_wms_t_layer(self, layer_name, url, layer_id=None, default_time=None, sty

def parse_wms_t_layer(self, layer):
# Obté la URL base i la capa / temps de la URL d'una capa
if layer.dataProvider().dataSourceUri().find("%26") >= 0:
# Cas especial on la url ja té un ? i s'ha afegit el paràmetre time amb "%26"
reg_ex = r"url=([\w\d\-\?_:./=]+)(?:\%26time=([\d\-/:]+))*.+layers=([\w\d\-_]+)"
else:
reg_ex = r"url=([\w\d\-_:./=]+)(?:\?time=([\d\-/:]+))*.+layers=([\w\d\-_]+)"
found = re.search(reg_ex, layer.dataProvider().dataSourceUri(), flags=re.IGNORECASE)
layer_uri = urllib.parse.unquote(layer.dataProvider().dataSourceUri())
reg_ex = r"(?:.*layers=([\w\d\-_]+))*.*url=([\w\d\-_:./=]+)(?:[\&\?]time=([\d\-/:]+))*(?:.*layers=([\w\d\-_]+))*"
found = re.search(reg_ex, layer_uri)
if not found:
return None, None, None
url, current_time, current_layer = found.groups()
return url, current_layer, current_time
current_layer1, url, current_time, current_layer2 = found.groups()
return url, current_layer1 or current_layer2, current_time

def is_wms_t_layer(self, layer):
# Obtenim el nom de la capa associada al temps escollit
Expand Down Expand Up @@ -4117,6 +4114,7 @@ def update_wms_layer(self, layer, wms_layer=None, wms_time=None, wms_style=None)
new_uri = layer.source()
else:
new_uri = layer.dataProvider().dataSourceUri()
new_uri = urllib.parse.unquote(new_uri)
if wms_layer:
new_uri = new_uri.replace("layers=%s" % current_layer, "layers=%s" % wms_layer)
if wms_time:
Expand Down

0 comments on commit 9e66af3

Please sign in to comment.