From a72b86f187781dad2cc6f7ea892a6d0f17aeb278 Mon Sep 17 00:00:00 2001 From: vaahtokarkki Date: Tue, 12 Dec 2023 09:45:35 +0200 Subject: [PATCH] fix: invalidate user processed and extent filters on data change --- CHANGELOG.md | 2 ++ src/quality_result_gui/quality_error_manager.py | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c272b8..8c82927 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- Fix: Filter newly inserted quality error rows correctly with user processed and map extent filters + ## [2.0.4] - 2023-10-05 - Fix: Redraw map when an error is selected and errors are not visualized on map diff --git a/src/quality_result_gui/quality_error_manager.py b/src/quality_result_gui/quality_error_manager.py index 07717fb..893df8c 100644 --- a/src/quality_result_gui/quality_error_manager.py +++ b/src/quality_result_gui/quality_error_manager.py @@ -105,9 +105,15 @@ def __init__( self._filter_user_processed_model = FilterByShowUserProcessedProxyModel() self._filter_user_processed_model.setSourceModel(self._filter_model) + self._base_model.filterable_data_changed.connect( + self._filter_user_processed_model.invalidateFilter + ) self._filter_map_extent_model = FilterByExtentProxyModel() self._filter_map_extent_model.setSourceModel(self._filter_user_processed_model) + self._base_model.filterable_data_changed.connect( + self._filter_map_extent_model.invalidateFilter + ) self._styled_model = StyleProxyModel() self._styled_model.setSourceModel(self._filter_map_extent_model)