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:
parent
882e64f790
commit
510a0f8b37
@ -18,6 +18,8 @@
|
||||
|
||||
#include "RimPolygonCollection.h"
|
||||
|
||||
#include "RiaColorTables.h"
|
||||
|
||||
#include "Rim3dView.h"
|
||||
#include "RimPolygon.h"
|
||||
#include "RimPolygonFile.h"
|
||||
@ -57,6 +59,9 @@ RimPolygon* RimPolygonCollection::createUserDefinedPolygon()
|
||||
auto newPolygon = new RimPolygon();
|
||||
newPolygon->setName( "Polygon " + QString::number( userDefinedPolygons().size() + 1 ) );
|
||||
|
||||
auto colorCandidates = RiaColorTables::summaryCurveDefaultPaletteColors();
|
||||
newPolygon->setColor( colorCandidates.cycledColor3f( userDefinedPolygons().size() ) );
|
||||
|
||||
return newPolygon;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user