mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Assign color to new polygon
This commit is contained in:
@@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
#include "RimPolygonCollection.h"
|
#include "RimPolygonCollection.h"
|
||||||
|
|
||||||
|
#include "RiaColorTables.h"
|
||||||
|
|
||||||
#include "Rim3dView.h"
|
#include "Rim3dView.h"
|
||||||
#include "RimPolygon.h"
|
#include "RimPolygon.h"
|
||||||
#include "RimPolygonFile.h"
|
#include "RimPolygonFile.h"
|
||||||
@@ -57,6 +59,9 @@ RimPolygon* RimPolygonCollection::createUserDefinedPolygon()
|
|||||||
auto newPolygon = new RimPolygon();
|
auto newPolygon = new RimPolygon();
|
||||||
newPolygon->setName( "Polygon " + QString::number( userDefinedPolygons().size() + 1 ) );
|
newPolygon->setName( "Polygon " + QString::number( userDefinedPolygons().size() + 1 ) );
|
||||||
|
|
||||||
|
auto colorCandidates = RiaColorTables::summaryCurveDefaultPaletteColors();
|
||||||
|
newPolygon->setColor( colorCandidates.cycledColor3f( userDefinedPolygons().size() ) );
|
||||||
|
|
||||||
return newPolygon;
|
return newPolygon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user