#1180 Use RiaColorTables for selection colors in 3D view

This commit is contained in:
Magne Sjaastad
2017-02-10 08:27:20 +01:00
parent 3c3e0d96ff
commit 722492b5c1
3 changed files with 10 additions and 63 deletions

View File

@@ -20,6 +20,7 @@
#include "RiuViewerCommands.h"
#include "RiaApplication.h"
#include "RiaColorTables.h"
#include "RicViewerEventInterface.h"
#include "RicEclipsePropertyFilterNewExec.h"
@@ -55,7 +56,6 @@
#include "RimWellPath.h"
#include "RiuMainWindow.h"
#include "RiuSelectionColors.h"
#include "RiuSelectionManager.h"
#include "RiuViewer.h"
@@ -579,10 +579,16 @@ void RiuViewerCommands::handlePickAction(int winPosX, int winPosY, Qt::KeyboardM
appendToSelection = true;
}
cvf::Color3f curveColor = RiuSelectionColors::curveColorFromTable();
if (RiuSelectionManager::instance()->isEmpty() || !appendToSelection)
std::vector<RiuSelectionItem*> items;
RiuSelectionManager::instance()->selectedItems(items);
const caf::ColorTable& colorTable = RiaColorTables::selectionPaletteColors();
cvf::Color3f curveColor = colorTable.cycledColor3f(items.size());
if (!appendToSelection)
{
curveColor = RiuSelectionColors::singleCurveColor();
curveColor = colorTable.cycledColor3f(0);
}
RiuSelectionItem* selItem = NULL;