From 65e61767f4f7ab9a808d4a3bd79c05f5d7c52d0c Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Thu, 9 Oct 2025 10:55:52 +0200 Subject: [PATCH] Fix typo and restore filter for tree view after update --- .../ProjectDataModel/Summary/RimEnsembleCurveSet.cpp | 4 ++-- Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewEditor.cpp | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveSet.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveSet.cpp index 541e49168f..21a0cc9c95 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveSet.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveSet.cpp @@ -2120,8 +2120,8 @@ void RimEnsembleCurveSet::updateEnsembleCurves( const std::vector(); auto yAddressText = m_yValuesSummaryAddress()->address().toEclipseTextAddress(); - auto xAaddressText = m_xAddressSelector->summaryAddress().toEclipseTextAddress(); - auto newRealizationHash = RiaHashTools::hash( sumCases, yAddressText, xAaddressText ); + auto xAddressText = m_xAddressSelector->summaryAddress().toEclipseTextAddress(); + auto newRealizationHash = RiaHashTools::hash( sumCases, yAddressText, xAddressText ); if ( newRealizationHash != m_realizationHash ) { deleteEnsembleCurves(); diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewEditor.cpp index fa5a578b33..b44a2a8caf 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewEditor.cpp @@ -312,6 +312,7 @@ void PdmUiTreeViewEditor::updateMySubTree( PdmUiItem* uiItem, bool notifyEditors // active and a calculation is parsed. This will cause a rebuild of the tree, and infinite recursion if a filter // is active. // https://github.com/OPM/ResInsight/issues/12983 + auto currentFilter = m_filterModel->filterRegularExpression(); m_filterModel->setFilterWildcard( "" ); PdmUiItem* itemToUpdate = uiItem; @@ -329,6 +330,10 @@ void PdmUiTreeViewEditor::updateMySubTree( PdmUiItem* uiItem, bool notifyEditors } m_treeViewModel->updateSubTree( itemToUpdate, notifyEditors ); + + // Restore filter after the update of the tree view model + m_filterModel->setFilterRegularExpression( currentFilter ); + updateItemDelegateForSubTree(); } }