mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-20 12:59:46 -06:00
#13806 Python: Add color legend scripting API
Expose RimColorLegendCollection and RimColorLegend to Python via CAF_PDM_OBJECT_METHOD entries that let callers create a legend, append category items with a hex-string color, bind a legend to a (case, resultName) pair and delete that binding. Scriptable fields on RimColorLegend and RimColorLegendItem make the created objects inspectable from Python. The (case, resultName) binding interface in RimColorLegendCollection, RimRegularLegendConfig and RimEclipseCellColors now takes a const RimCase* instead of a case id, matching the caller patterns and avoiding ambiguity when multiple cases share an id domain.
This commit is contained in:
1 parent
75c1cedaec
commit
cf62f07224
13 files changed
+323
-39
No files matched your search
+1
-4
@@ -373,10 +373,7 @@ void RimIntersectionResultDefinition::setDefaultEclipseLegendConfig()
|
||||
auto eclResultDef = eclipseResultDefinition();
|
||||
eclResultDef->updateRangesForExplicitLegends( regularLegendConfig(), ternaryLegendConfig(), timeStep() );
|
||||
|
||||
m_legendConfig->setDefaultConfigForResultName( m_case->caseId(),
|
||||
m_eclipseResultDefinition->resultVariable(),
|
||||
useDiscreteLogLevels,
|
||||
isCategoryResult );
|
||||
m_legendConfig->setDefaultConfigForResultName( m_case, m_eclipseResultDefinition->resultVariable(), useDiscreteLogLevels, isCategoryResult );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user