diff --git a/metadata.txt b/metadata.txt index 59aa9f1..f86f463 100644 --- a/metadata.txt +++ b/metadata.txt @@ -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 diff --git a/qlib3/base/anaglyphdialog.py b/qlib3/base/anaglyphdialog.py index dcb13ac..0e43bae 100644 --- a/qlib3/base/anaglyphdialog.py +++ b/qlib3/base/anaglyphdialog.py @@ -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): diff --git a/qlib3/base/pluginbase.py b/qlib3/base/pluginbase.py index abae038..005d25c 100644 --- a/qlib3/base/pluginbase.py +++ b/qlib3/base/pluginbase.py @@ -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 @@ -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: