mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#266) Hide tickmarks at first and last tick mark position
This commit is contained in:
@@ -565,7 +565,12 @@ void RivGridBoxGenerator::createLegend(EdgeType edge, cvf::Collection<cvf::Part>
|
||||
// Do not draw legend labels at first/last tick mark
|
||||
for (size_t idx = 1; idx < domainCoordsTickValues->size() - 1; idx++)
|
||||
{
|
||||
geo->addText(cvf::String(domainCoordsTickValues->at(idx)), vertices->get(idx*2 + 1) + (0.5f * tickLength) * tickMarkDir);
|
||||
double legendValue = domainCoordsTickValues->at(idx);
|
||||
if (axis == Z_AXIS)
|
||||
{
|
||||
legendValue = -domainCoordsTickValues->at(idx);
|
||||
}
|
||||
geo->addText(cvf::String(legendValue), vertices->get(idx*2 + 1) + (0.5f * tickLength) * tickMarkDir);
|
||||
}
|
||||
|
||||
cvf::ref<cvf::Part> part = new cvf::Part;
|
||||
|
||||
Reference in New Issue
Block a user