Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(webviewer): setWindowsTitle was failing when default browser is s… #166

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Loading