#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:
Gaute Lindkvist
2018-11-22 13:39:08 +01:00
parent 132408ab6f
commit ae8cb9d210
17 changed files with 166 additions and 67 deletions
@@ -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);
}
}
}