mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3407 Default color palette for new well paths
This commit is contained in:
parent
d5d18bde09
commit
5a9a5ba803
@ -497,6 +497,26 @@ const caf::ColorTable& RiaColorTables::timestepsPaletteColors()
|
|||||||
return colorTable;
|
return colorTable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
const caf::ColorTable& RiaColorTables::editableWellPathsPaletteColors()
|
||||||
|
{
|
||||||
|
static std::vector<cvf::Color3ub> colors{
|
||||||
|
cvf::Color3ub( 204, 0, 204), // Dark magenta
|
||||||
|
cvf::Color3ub( 173, 23, 212), // Strong Purple
|
||||||
|
cvf::Color3ub( 143, 46, 219), //Purple
|
||||||
|
cvf::Color3ub( 102, 76, 230), // Gray Blue
|
||||||
|
cvf::Color3ub( 71, 99, 237), // Lighter Gray Blue
|
||||||
|
cvf::Color3ub( 31, 130, 247), // Strong Blue
|
||||||
|
cvf::Color3ub( 0, 153, 255), // Dark Turquise
|
||||||
|
};
|
||||||
|
|
||||||
|
static caf::ColorTable colorTable = caf::ColorTable(colors);
|
||||||
|
|
||||||
|
return colorTable;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -53,6 +53,7 @@ public:
|
|||||||
static const caf::ColorTable& wellLogPlotPaletteColors();
|
static const caf::ColorTable& wellLogPlotPaletteColors();
|
||||||
static const caf::ColorTable& selectionPaletteColors();
|
static const caf::ColorTable& selectionPaletteColors();
|
||||||
static const caf::ColorTable& timestepsPaletteColors();
|
static const caf::ColorTable& timestepsPaletteColors();
|
||||||
|
static const caf::ColorTable& editableWellPathsPaletteColors();
|
||||||
|
|
||||||
static cvf::Color3f undefinedCellColor();
|
static cvf::Color3f undefinedCellColor();
|
||||||
static cvf::Color3f perforationLengthColor();
|
static cvf::Color3f perforationLengthColor();
|
||||||
|
@ -29,6 +29,7 @@ CAF_CMD_SOURCE_INIT(RicNewEditableWellPathFeature, "RicNewEditableWellPathFeatur
|
|||||||
#include "RimOilField.h"
|
#include "RimOilField.h"
|
||||||
#include "Riu3DMainWindowTools.h"
|
#include "Riu3DMainWindowTools.h"
|
||||||
#include "RimWellPathGeometryDef.h"
|
#include "RimWellPathGeometryDef.h"
|
||||||
|
#include "RiaColorTables.h"
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
@ -71,9 +72,15 @@ void RicNewEditableWellPathFeature::onActionTriggered(bool isChecked)
|
|||||||
{
|
{
|
||||||
std::vector<RimWellPath*> newWellPaths;
|
std::vector<RimWellPath*> newWellPaths;
|
||||||
auto newModeledWellPath = new RimModeledWellPath();
|
auto newModeledWellPath = new RimModeledWellPath();
|
||||||
newModeledWellPath->setUnitSystem(project->commonUnitSystemForAllCases());
|
|
||||||
newWellPaths.push_back(newModeledWellPath);
|
newWellPaths.push_back(newModeledWellPath);
|
||||||
newWellPaths.back()->setName("UWell-" + QString::number(wellPathCollection->modelledWellPathCount()+1));
|
|
||||||
|
newModeledWellPath->setUnitSystem(project->commonUnitSystemForAllCases());
|
||||||
|
|
||||||
|
size_t modelledWellpathCount = wellPathCollection->modelledWellPathCount();
|
||||||
|
|
||||||
|
newWellPaths.back()->setName("UWell-" + QString::number(modelledWellpathCount+1));
|
||||||
|
newModeledWellPath->setWellPathColor(RiaColorTables::editableWellPathsPaletteColors().cycledColor3f(modelledWellpathCount));
|
||||||
|
|
||||||
wellPathCollection->addWellPaths(newWellPaths);
|
wellPathCollection->addWellPaths(newWellPaths);
|
||||||
wellPathCollection->uiCapability()->updateConnectedEditors();
|
wellPathCollection->uiCapability()->updateConnectedEditors();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user