mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3156 Make formation labels optional even if formation lines are shown
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user