#3156 Make formation labels optional even if formation lines are shown

This commit is contained in:
Gaute Lindkvist
2018-07-06 09:16:03 +02:00
parent 8b258d6edd
commit f8a7ba541f
5 changed files with 45 additions and 12 deletions

View File

@@ -34,7 +34,7 @@ RiuPlotAnnotationTool::~RiuPlotAnnotationTool()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuPlotAnnotationTool::attachFormationNames(QwtPlot* plot, const std::vector<QString>& names, const std::vector<std::pair<double, double>> yPositions)
void RiuPlotAnnotationTool::attachFormationNames(QwtPlot* plot, const std::vector<QString>& names, const std::vector<std::pair<double, double>> yPositions, bool showNames)
{
detachAllAnnotations();
@@ -47,10 +47,14 @@ void RiuPlotAnnotationTool::attachFormationNames(QwtPlot* plot, const std::vecto
{
QwtPlotMarker* line(new QwtPlotMarker());
QString name = names[i];
if (names[i].toLower().indexOf("top") == -1)
QString name;
if (showNames)
{
name += " Top";
name = names[i];
if (names[i].toLower().indexOf("top") == -1)
{
name += " Top";
}
}
RiuPlotAnnotationTool::horizontalDashedLine(line, name, yPositions[i].first);

View File

@@ -34,7 +34,7 @@ public:
RiuPlotAnnotationTool() {};
~RiuPlotAnnotationTool();
void attachFormationNames(QwtPlot* plot, const std::vector<QString>& names, const std::vector<std::pair<double, double>> yPositions);
void attachFormationNames(QwtPlot* plot, const std::vector<QString>& names, const std::vector<std::pair<double, double>> yPositions, bool showNames = true);
void attachWellPicks(QwtPlot* plot, const std::vector<QString>& names, const std::vector<double> yPositions);
void detachAllAnnotations();