Improve method name to reflect implementation.

RimColorLegendCollection::allColorLegeds is better than
RimColorLegendCollection::customColorLegends since method returns both kinds
of color legends.
This commit is contained in:
Kristian Bendiksen 2020-05-23 11:19:36 +02:00 committed by Magne Sjaastad
parent 0b9577df71
commit 30ee125749
4 changed files with 5 additions and 5 deletions

View File

@ -122,7 +122,7 @@ void RimColorLegendCollection::createStandardColorLegends()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RimColorLegend*> RimColorLegendCollection::customColorLegends() const
std::vector<RimColorLegend*> RimColorLegendCollection::allColorLegends() const
{
std::vector<RimColorLegend*> allLegends;
@ -155,7 +155,7 @@ void RimColorLegendCollection::fieldChangedByUi( const caf::PdmFieldHandle* chan
//--------------------------------------------------------------------------------------------------
RimColorLegend* RimColorLegendCollection::findByName( const QString& name ) const
{
std::vector<RimColorLegend*> allLegends = customColorLegends();
std::vector<RimColorLegend*> allLegends = allColorLegends();
for ( auto legend : allLegends )
{
if ( legend->colorLegendName() == name )

View File

@ -50,7 +50,7 @@ public:
void deleteCustomColorLegends();
std::vector<RimColorLegend*> customColorLegends() const;
std::vector<RimColorLegend*> allColorLegends() const;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;

View File

@ -1064,7 +1064,7 @@ QList<caf::PdmOptionItemInfo>
{
RimProject* project = RimProject::current();
RimColorLegendCollection* colorLegendCollection = project->colorLegendCollection();
std::vector<RimColorLegend*> colorLegends = colorLegendCollection->customColorLegends();
std::vector<RimColorLegend*> colorLegends = colorLegendCollection->allColorLegends();
for ( RimColorLegend* colorLegend : colorLegends )
{

View File

@ -1038,7 +1038,7 @@ QList<caf::PdmOptionItemInfo> RimWellLogTrack::calculateValueOptions( const caf:
{
RimProject* project = RimProject::current();
RimColorLegendCollection* colorLegendCollection = project->colorLegendCollection();
std::vector<RimColorLegend*> colorLegends = colorLegendCollection->customColorLegends();
std::vector<RimColorLegend*> colorLegends = colorLegendCollection->allColorLegends();
for ( RimColorLegend* colorLegend : colorLegends )
{