mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05:00
#3741 Make it possible to enable/disable all well path components in plots and 3d view.
* Add check box to casing design and update of plot * Add isEnabled() method to component interface which controls plotting.
This commit is contained in:
@@ -1799,7 +1799,6 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
|
||||
m_wellPathAttributePlotObjects.push_back(std::unique_ptr<RiuWellPathComponentPlotItem>(new RiuWellPathComponentPlotItem(wellPathAttributeSource())));
|
||||
}
|
||||
|
||||
|
||||
if (m_showWellPathAttributes)
|
||||
{
|
||||
if (m_wellPathAttributeCollection)
|
||||
@@ -1813,13 +1812,16 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
|
||||
std::set<QString> attributesAssignedToLegend;
|
||||
for (RimWellPathAttribute* attribute : attributes)
|
||||
{
|
||||
std::unique_ptr<RiuWellPathComponentPlotItem> plotItem(new RiuWellPathComponentPlotItem(wellPathAttributeSource(), attribute));
|
||||
QString legendTitle = plotItem->legendTitle();
|
||||
bool contributeToLegend = m_wellPathAttributesInLegend() &&
|
||||
!attributesAssignedToLegend.count(legendTitle);
|
||||
plotItem->setContributeToLegend(contributeToLegend);
|
||||
m_wellPathAttributePlotObjects.push_back(std::move(plotItem));
|
||||
attributesAssignedToLegend.insert(legendTitle);
|
||||
if (attribute->isEnabled())
|
||||
{
|
||||
std::unique_ptr<RiuWellPathComponentPlotItem> plotItem(new RiuWellPathComponentPlotItem(wellPathAttributeSource(), attribute));
|
||||
QString legendTitle = plotItem->legendTitle();
|
||||
bool contributeToLegend = m_wellPathAttributesInLegend() &&
|
||||
!attributesAssignedToLegend.count(legendTitle);
|
||||
plotItem->setContributeToLegend(contributeToLegend);
|
||||
m_wellPathAttributePlotObjects.push_back(std::move(plotItem));
|
||||
attributesAssignedToLegend.insert(legendTitle);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1831,13 +1833,16 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
|
||||
std::set<QString> completionsAssignedToLegend;
|
||||
for (const RimWellPathComponentInterface* completion : allCompletions)
|
||||
{
|
||||
std::unique_ptr<RiuWellPathComponentPlotItem> plotItem(new RiuWellPathComponentPlotItem(wellPathAttributeSource(), completion));
|
||||
QString legendTitle = plotItem->legendTitle();
|
||||
bool contributeToLegend = m_wellPathCompletionsInLegend() &&
|
||||
!completionsAssignedToLegend.count(legendTitle);
|
||||
plotItem->setContributeToLegend(contributeToLegend);
|
||||
m_wellPathAttributePlotObjects.push_back(std::move(plotItem));
|
||||
completionsAssignedToLegend.insert(legendTitle);
|
||||
if (completion->isEnabled())
|
||||
{
|
||||
std::unique_ptr<RiuWellPathComponentPlotItem> plotItem(new RiuWellPathComponentPlotItem(wellPathAttributeSource(), completion));
|
||||
QString legendTitle = plotItem->legendTitle();
|
||||
bool contributeToLegend = m_wellPathCompletionsInLegend() &&
|
||||
!completionsAssignedToLegend.count(legendTitle);
|
||||
plotItem->setContributeToLegend(contributeToLegend);
|
||||
m_wellPathAttributePlotObjects.push_back(std::move(plotItem));
|
||||
completionsAssignedToLegend.insert(legendTitle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user