aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main.cpp2
-rw-r--r--qt-ui/diveplanner.cpp8
-rw-r--r--qt-ui/graphicsview-common.cpp2
-rw-r--r--qt-ui/graphicsview-common.h2
4 files changed, 3 insertions, 11 deletions
diff --git a/main.cpp b/main.cpp
index c447a45e7..229696055 100644
--- a/main.cpp
+++ b/main.cpp
@@ -21,7 +21,7 @@ int main(int argc, char **argv)
setup_system_prefs();
prefs = default_prefs;
-
+ fill_profile_color();
init_ui(&argc, &argv);
parse_xml_init();
taglist_init_global();
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 6a26e00f9..c5715f9df 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -42,13 +42,6 @@ QString dpGasToStr(const divedatapoint &p)
return gasToStr(p.o2, p.he);
}
-QColor getColor(const color_indice_t i)
-{
- if (profile_color.count() > i && i >= 0)
- return profile_color[i].at(0);
- return QColor(Qt::black);
-}
-
static DivePlannerPointsModel *plannerModel = DivePlannerPointsModel::instance();
DivePlannerGraphics::DivePlannerGraphics(QWidget *parent) : QGraphicsView(parent),
@@ -65,7 +58,6 @@ DivePlannerGraphics::DivePlannerGraphics(QWidget *parent) : QGraphicsView(parent
minDepth(M_OR_FT(40, 120)),
dpMaxTime(0)
{
- fill_profile_color();
setBackgroundBrush(profile_color[BACKGROUND].at(0));
setMouseTracking(true);
setScene(new QGraphicsScene());
diff --git a/qt-ui/graphicsview-common.cpp b/qt-ui/graphicsview-common.cpp
index 249016033..0c64831e2 100644
--- a/qt-ui/graphicsview-common.cpp
+++ b/qt-ui/graphicsview-common.cpp
@@ -58,7 +58,7 @@ void fill_profile_color()
#undef COLOR
}
-QColor getColor(const color_indice_t i, bool isGrayscale = false)
+QColor getColor(const color_indice_t i, bool isGrayscale)
{
if (profile_color.count() > i && i >= 0)
return profile_color[i].at((isGrayscale) ? 1 : 0);
diff --git a/qt-ui/graphicsview-common.h b/qt-ui/graphicsview-common.h
index 046527d3f..417cd2e65 100644
--- a/qt-ui/graphicsview-common.h
+++ b/qt-ui/graphicsview-common.h
@@ -73,7 +73,7 @@ typedef enum {
extern QMap<color_indice_t, QVector<QColor> > profile_color;
void fill_profile_color();
-QColor getColor(const color_indice_t i);
+QColor getColor(const color_indice_t i, bool isGrayscale = false);
QColor getSacColor(int sac, int diveSac);
struct text_render_options {
double size;