mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2008 RFT plot. Cycle symbols and colors
This commit is contained in:
parent
39dc4c0c06
commit
3e986a63a1
@ -125,7 +125,6 @@ void RimWellRftPlot::applyCurveAppearance(RimWellLogCurve* newCurve)
|
|||||||
|
|
||||||
std::vector<RimPlotCurve::PointSymbolEnum> symbolTable =
|
std::vector<RimPlotCurve::PointSymbolEnum> symbolTable =
|
||||||
{
|
{
|
||||||
RimPlotCurve::SYMBOL_NONE,
|
|
||||||
RimPlotCurve::SYMBOL_ELLIPSE,
|
RimPlotCurve::SYMBOL_ELLIPSE,
|
||||||
RimPlotCurve::SYMBOL_RECT,
|
RimPlotCurve::SYMBOL_RECT,
|
||||||
RimPlotCurve::SYMBOL_DIAMOND,
|
RimPlotCurve::SYMBOL_DIAMOND,
|
||||||
@ -134,8 +133,12 @@ void RimWellRftPlot::applyCurveAppearance(RimWellLogCurve* newCurve)
|
|||||||
RimPlotCurve::SYMBOL_XCROSS
|
RimPlotCurve::SYMBOL_XCROSS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// State variables
|
||||||
|
static size_t defaultColorTableIndex = 0;
|
||||||
|
static size_t defaultSymbolTableIndex = 0;
|
||||||
|
|
||||||
cvf::Color3f currentColor;
|
cvf::Color3f currentColor;
|
||||||
RimPlotCurve::PointSymbolEnum currentSymbol = RimPlotCurve::SYMBOL_NONE;
|
RimPlotCurve::PointSymbolEnum currentSymbol = symbolTable.front();
|
||||||
RimPlotCurve::LineStyleEnum currentLineStyle = RimPlotCurve::STYLE_SOLID;
|
RimPlotCurve::LineStyleEnum currentLineStyle = RimPlotCurve::STYLE_SOLID;
|
||||||
bool isCurrentColorSet = false;
|
bool isCurrentColorSet = false;
|
||||||
bool isCurrentSymbolSet = false;
|
bool isCurrentSymbolSet = false;
|
||||||
@ -177,7 +180,10 @@ void RimWellRftPlot::applyCurveAppearance(RimWellLogCurve* newCurve)
|
|||||||
}
|
}
|
||||||
if (!isCurrentColorSet)
|
if (!isCurrentColorSet)
|
||||||
{
|
{
|
||||||
currentColor = colorTable.front();
|
currentColor = colorTable[defaultColorTableIndex];
|
||||||
|
if (++defaultColorTableIndex == colorTable.size())
|
||||||
|
defaultColorTableIndex = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,8 +192,6 @@ void RimWellRftPlot::applyCurveAppearance(RimWellLogCurve* newCurve)
|
|||||||
{
|
{
|
||||||
for (const auto& symbol : symbolTable)
|
for (const auto& symbol : symbolTable)
|
||||||
{
|
{
|
||||||
if (symbol == RimPlotCurve::SYMBOL_NONE) continue;
|
|
||||||
|
|
||||||
if (assignedSymbols.count(symbol) == 0)
|
if (assignedSymbols.count(symbol) == 0)
|
||||||
{
|
{
|
||||||
currentSymbol = symbol;
|
currentSymbol = symbol;
|
||||||
@ -197,7 +201,9 @@ void RimWellRftPlot::applyCurveAppearance(RimWellLogCurve* newCurve)
|
|||||||
}
|
}
|
||||||
if (!isCurrentSymbolSet)
|
if (!isCurrentSymbolSet)
|
||||||
{
|
{
|
||||||
currentSymbol = symbolTable.front();
|
currentSymbol = symbolTable[defaultSymbolTableIndex];
|
||||||
|
if (++defaultSymbolTableIndex == symbolTable.size())
|
||||||
|
defaultSymbolTableIndex = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user