Commit Graph
2 Commits
Author SHA1 Message Date
Kristian Bendiksen fc7d5c0594 #15008 Test that the added folder matches subCollectionClassKeyword()
The Python generator declares the add_folder() return type from
subCollectionClassKeyword(), while the folder is created by
createSubCollection(). Nothing tied the two together, so overriding only
one of them would give wrong type hints without any failing test.

ResInsight-tests: the folder added to a polygon collection, a surface
collection and an ensemble surface has the class named by
subCollectionClassKeyword(), and a polygon file declares and creates no
folder.
2026-11-05 14:40:52 +01:00
Stefan Crooijmans ece73a749c #15008 Python: Return the displayed folder name from collection_name()
collection_name() returned the stored m_collectionName, which is empty
for a RimPolygonFile or RimPolygonCloudAddress without a name. Both
classes fall back to the file name or a default ("Polygon File", "Sumo
Polygon Address") in name().

PdmNestedCollectionBase::displayName() is a virtual that defaults to
collectionName(); RimPolygonFile and RimPolygonCloudAddress override it
with name(), and CollectionNameInternal returns displayName().
collectionName() itself is unchanged, since findSubCollectionByName()
and the name conflict policy compare stored names.

ResInsight-tests: RimcNestedCollectionBase-Test covers a polygon
collection, a polygon file (default, base name, file name fallback) and
a cloud polygon address.
2026-11-05 08:50:36 +01:00