Skip to content

Commit

Permalink
#11161 Change default tree visibility state for childField and childA…
Browse files Browse the repository at this point in the history
…rrayField
  • Loading branch information
magnesj committed Feb 2, 2024
1 parent c456e96 commit d3c5823
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ RimSummaryPlot::RimSummaryPlot()
m_asciiDataCurves.uiCapability()->setUiTreeHidden( true );

CAF_PDM_InitFieldNoDefault( &m_axisPropertiesArray, "AxisProperties", "Axes", ":/Axes16x16.png" );
m_axisPropertiesArray.uiCapability()->setUiTreeHidden( false );

auto leftAxis = addNewAxisProperties( RiuPlotAxis::defaultLeft(), "Left" );
leftAxis->setAlwaysRequired( true );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ class PdmFieldUiCap<PdmChildField<DataType*>> : public PdmUiFieldHandle
PdmFieldUiCap( FieldType* field, bool giveOwnership )
: PdmUiFieldHandle( field, giveOwnership )
{
// In almost all use cases, we want to hide the visual appearance of the child field.
// The object contained in the child field will be visible in the project tree as a child of the
// parent object.
setUiTreeHidden( true );
}

// Gui generalized interface
Expand All @@ -66,6 +70,11 @@ class PdmFieldUiCap<PdmChildArrayField<DataType*>> : public PdmUiFieldHandle
PdmFieldUiCap( FieldType* field, bool giveOwnership )
: PdmUiFieldHandle( field, giveOwnership )
{
// In almost all use cases, we want to hide the visual appearance of the child array field.
// They are usually members of a collection object, and this object is usually visible in the project tree
// The objects contained in the child array field will be visible in the project tree as children of the
// collection object
setUiTreeHidden( true );
}

// Gui generalized interface
Expand Down

0 comments on commit d3c5823

Please sign in to comment.