mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2480 2d intersection view. Adjusted category legends position
This commit is contained in:
parent
2fa8202332
commit
28830d3a1b
@ -561,14 +561,7 @@ void RiuViewer::addColorLegendToBottomLeftCorner(cvf::OverlayItem* legend)
|
|||||||
caf::CategoryLegend* catLegend = dynamic_cast<caf::CategoryLegend*>(legend.p());
|
caf::CategoryLegend* catLegend = dynamic_cast<caf::CategoryLegend*>(legend.p());
|
||||||
if (catLegend)
|
if (catLegend)
|
||||||
{
|
{
|
||||||
if (catLegend->categoryCount() > categoryThreshold)
|
categoryLegends.push_back(catLegend);
|
||||||
{
|
|
||||||
categoryLegends.push_back(catLegend);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
catLegend->setSizeHint(cvf::Vec2ui(200, 200));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -594,8 +587,15 @@ void RiuViewer::addColorLegendToBottomLeftCorner(cvf::OverlayItem* legend)
|
|||||||
for (auto catLegend : categoryLegends)
|
for (auto catLegend : categoryLegends)
|
||||||
{
|
{
|
||||||
catLegend->setLayoutFixedPosition(cvf::Vec2i(xPos, yPos));
|
catLegend->setLayoutFixedPosition(cvf::Vec2i(xPos, yPos));
|
||||||
catLegend->setSizeHint(cvf::Vec2ui(categoryWidth, height - 2*border - axisCrossHeight - 2*edgeAxisBorderHeight));
|
|
||||||
|
|
||||||
|
if (catLegend->categoryCount() > categoryThreshold)
|
||||||
|
{
|
||||||
|
catLegend->setSizeHint(cvf::Vec2ui(categoryWidth, height - 2 * border - axisCrossHeight - 2 * edgeAxisBorderHeight));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
catLegend->setSizeHint(cvf::Vec2ui(200, 200));
|
||||||
|
}
|
||||||
xPos += categoryWidth + border;
|
xPos += categoryWidth + border;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user