#12983 Clears filter during tree update

Avoids infinite recursion when updating the tree while a search filter is active.

This can occur when a calculation is parsed and a filter is active, causing a rebuild of the tree and infinite recursion.
This commit is contained in:
Magne Sjaastad committed 2025-10-07 12:17:42 +02:00
1 parent 395ed06725
commit a9e42e017a
1 file changed
+6
@@ -308,6 +308,12 @@ void PdmUiTreeViewEditor::updateMySubTree( PdmUiItem* uiItem, bool notifyEditors
{
if ( m_treeViewModel )
{
// Clear filter, to avoid infinite recursion when updating the tree. This can happen if a search filter is
// 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
m_filterModel->setFilterWildcard( "" );
PdmUiItem* itemToUpdate = uiItem;
PdmUiObjectHandle* uiObjectHandle = dynamic_cast<PdmUiObjectHandle*>( uiItem );