Skip to content

Commit

Permalink
Merge pull request #166 from geotribu/fix/webviewer-title-if-default-…
Browse files Browse the repository at this point in the history
…browser

fix(webviewer): setWindowsTitle was failing when default browser is s…
  • Loading branch information
Guts committed Apr 30, 2024
2 parents 63c8e4e + d5333b1 commit ef08cec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions qtribu/logic/web_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

# Standard library
import logging
from typing import Optional

# PyQGIS
from qgis.PyQt.QtCore import QCoreApplication, Qt
Expand Down Expand Up @@ -44,6 +45,7 @@ class WebViewer:
def __init__(self):
"""Class initialization."""
self.log = PlgLogger().log
self.wdg_web: Optional[QWidget] = None

def display_web_page(self, url: str):
"""Parse the feed XML as string and store items into an ordered tuple of tuples.
Expand Down
3 changes: 2 additions & 1 deletion qtribu/toolbelt/commons.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ def open_url_in_webviewer(url: str, window_title: str) -> None:
:type window_title: str
"""
web_viewer.display_web_page(url)
web_viewer.set_window_title(window_title)
if web_viewer.wdg_web:
web_viewer.set_window_title(window_title)

0 comments on commit ef08cec

Please sign in to comment.