diff --git a/geom/geomUtils.cpp b/geom/geomUtils.cpp index 2fe6d71..3203dee 100644 --- a/geom/geomUtils.cpp +++ b/geom/geomUtils.cpp @@ -50,6 +50,10 @@ static const char * ss_xgraph_colors[] = "#6C7B8B", "#FF00FF", "#00CDCD", "navy", "gold" // 11, ..., 15 }; +void setCurrentDefaultColor(int color){ + ss_default_color_ind = color; +} + std::string getCurrentDefaultColor() { ss_default_color_ind++; if (ss_default_color_ind >= 15){ diff --git a/geom/geomUtils.h b/geom/geomUtils.h index bb8dbda..f92f72d 100644 --- a/geom/geomUtils.h +++ b/geom/geomUtils.h @@ -31,6 +31,7 @@ #include std::string getCurrentDefaultColor(); +void setCurrentDefaultColor(int color); struct dPoint{ double x, y; diff --git a/gui/polyView.cpp b/gui/polyView.cpp index acbad53..595cee2 100644 --- a/gui/polyView.cpp +++ b/gui/polyView.cpp @@ -3304,6 +3304,7 @@ void polyView::redo() { void polyView::reloadPolys() { + setCurrentDefaultColor(0);// reset default color so that reloaded polygons have the same color as before readAllPolys(); refreshPixmap(); }