Skip to content

Commit

Permalink
Fix a bug where the Gramps User Interface would not be correctly rere…
Browse files Browse the repository at this point in the history
…ndered after changes were made. (#1234)
  • Loading branch information
bartfeenstra authored Feb 1, 2024
1 parent faa1aa5 commit f1d6d77
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions betty/extension/gramps/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
from __future__ import annotations

from contextlib import suppress
from pathlib import Path
from typing import Any

Expand All @@ -28,9 +29,9 @@ def __init__(self, app: App, *args: Any, **kwargs: Any):
self._layout = QVBoxLayout()
self.setLayout(self._layout)

self._family_trees_widget = QWidget()
self._family_trees_layout = QGridLayout()
self._family_trees_remove_buttons: list[QPushButton] = []
self._family_trees_widget: QWidget
self._family_trees_layout: QGridLayout
self._family_trees_remove_buttons: list[QPushButton]

self._build_family_trees()

Expand All @@ -40,6 +41,8 @@ def __init__(self, app: App, *args: Any, **kwargs: Any):

@reactive_method(on_trigger_call=True)
def _build_family_trees(self) -> None:
with suppress(AttributeError):
self._family_trees_widget.setParent(None)
self._family_trees_widget = QWidget()
self._family_trees_layout = QGridLayout()
self._family_trees_remove_buttons = []
Expand Down

0 comments on commit f1d6d77

Please sign in to comment.