From e8ef2de64d180f259364604425de111ad1fe265a Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 7 Mar 2013 17:09:35 +0000 Subject: [PATCH] Fixed duplicate colors when using the internal library. --- common/lc_application.cpp | 1 - common/lc_colors.cpp | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/common/lc_application.cpp b/common/lc_application.cpp index c524c886..f7df143d 100644 --- a/common/lc_application.cpp +++ b/common/lc_application.cpp @@ -244,7 +244,6 @@ bool lcApplication::Initialize(int argc, char* argv[], const char* LibraryInstal return false; } - lcLoadDefaultColors(); m_Library->CreateBuiltinPieces(); SystemDoMessageBox("LeoCAD could not find a compatible Pieces Library so only a small number of pieces will be available.\n\n" diff --git a/common/lc_colors.cpp b/common/lc_colors.cpp index 5ea94a07..c3ba5708 100644 --- a/common/lc_colors.cpp +++ b/common/lc_colors.cpp @@ -350,6 +350,9 @@ bool lcLoadColorFile(lcFile& File) Colors.RemoveAll(); + for (int GroupIdx = 0; GroupIdx < LC_NUM_COLORGROUPS; GroupIdx++) + gColorGroups[GroupIdx].Colors.RemoveAll(); + strcpy(gColorGroups[0].Name, "Solid Colors"); strcpy(gColorGroups[1].Name, "Translucent Colors"); strcpy(gColorGroups[2].Name, "Special Colors");