#14558 3D filters: Reconnect filter signals after project load - #14610
Open
magnesj wants to merge 1 commit into
Open
#14558 3D filters: Reconnect filter signals after project load#14610magnesj wants to merge 1 commit into
magnesj wants to merge 1 commit into
Conversation
Reading a caf::PdmPtrField sets the pointer to null before the reference string is resolved, and clearing a ptr field disconnects all signals between the referenced object and the field owner. The signal connections established by RimFilterInViewCollection::setSourceCollections() in the view constructor were therefore lost when a project was loaded, and adding a cell filter, property filter or data filter no longer refreshed the Filters node in the project tree. Reconnect in initAfterRead, which runs after the references have been resolved.
jonjenssen
reviewed
Aug 26, 2026
| /// setSourceCollections() in the view constructor are therefore lost when a project is loaded. | ||
| /// Reconnect here, after the references have been resolved, so the tree keeps refreshing when a | ||
| /// filter is added. | ||
| //-------------------------------------------------------------------------------------------------- |
Collaborator
There was a problem hiding this comment.
Is this comment necessary?
jonjenssen
approved these changes
Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #14558
Problem
After saving a project, closing it and loading it again, creating a cell filter (e.g. an I slice filter) does not update the project tree. The Filters node stays empty until the filter collection is toggled on/off, after which the new filter shows up.
Root cause
RimFilterInViewCollectionholds the three filter collections incaf::PdmPtrFields and refreshes its tree node when they emitfiltersChanged/wrappersChanged. The connections are established once, fromRimEclipseView's constructor, viasetSourceCollections().Fix
Reconnect the source signals in
RimFilterInViewCollection::initAfterRead(), which runs afterresolveReferencesRecursively()during project load. This is the same pattern already used byRimDataFilterInViewCollection::initAfterRead(). Cell filters, Eclipse property filters and per-view data filter wrappers are all covered.Tests
Added
RimFilterInViewCollection-Test.cpp, verifying that the facade observes all three source collections both in a new view and after an XML write/read/resolve round trip. The round trip test fails without the fix.