mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 23:20:29 -05:00
#14074 CellFilters: Notify filter facade from all property-filter mutations
The view filter nodes were unified under a read-only RimFilterInViewCollection facade, and the source collections are now tree-hidden. As a result, the existing collection->updateConnectedEditors() calls no longer refresh the tree: the filters are shown under the facade, which only refreshes when a source emits filtersChanged/wrappersChanged. Several property-filter mutations changed the child array without emitting that signal (insertAt/push_back/erase do not auto-fire onChildAdded/onChildDeleted), so newly created or removed filters did not appear under the Filters node: property filter insert, new combined filter, add linked filter, undo of a property-filter creation, and Show Contributing Wells. Emit the change signal from these paths (via the existing onChildAdded hook, or filtersChanged on removal) so the single facade handler refreshes the tree. The cell-filter, paste, property-add and data-filter paths already emit the signal and are unchanged.
This commit is contained in:
1 parent
c1ea8261aa
commit
78a6d0a8e5
5 files changed
+21
-1
No files matched your search
+12
@@ -283,6 +283,8 @@ RimEclipsePropertyFilter* RimEclipsePropertyFilterCollection::addFilterLinkedToC
|
||||
updateDefaultResult( view->cellResult() );
|
||||
}
|
||||
|
||||
notifyFiltersChanged();
|
||||
|
||||
return propertyFilter;
|
||||
}
|
||||
|
||||
@@ -316,6 +318,15 @@ void RimEclipsePropertyFilterCollection::onChildDeleted( caf::PdmChildArrayField
|
||||
filtersChanged.send();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipsePropertyFilterCollection::notifyFiltersChanged()
|
||||
{
|
||||
updateDisplayModelNotifyManagedViews( nullptr );
|
||||
filtersChanged.send();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -331,5 +342,6 @@ RimCombinedFilter* RimEclipsePropertyFilterCollection::addNewCombinedFilter()
|
||||
|
||||
m_propertyFilters.push_back( combined );
|
||||
updateConnectedEditors();
|
||||
notifyFiltersChanged();
|
||||
return combined;
|
||||
}
|
||||
@@ -70,6 +70,10 @@ public:
|
||||
void onChildAdded( caf::PdmFieldHandle* containerForNewObject ) override;
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray, std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
// Refresh managed views and notify the filter facade after a filter is added or removed outside
|
||||
// the PDM onChildAdded/onChildDeleted hooks (e.g. push_back/insertAt/erase, which do not fire them).
|
||||
void notifyFiltersChanged();
|
||||
|
||||
protected:
|
||||
void initAfterRead() override;
|
||||
void appendMenuItems( caf::CmdFeatureMenuBuilder& menuBuilder ) const override;
|
||||
|
||||
Reference in new issue
Block a user