src/ldConfig.cc

changeset 795
195fa1fff9c3
parent 789
4b7306f52bb5
child 800
a1d9b7fff8f7
--- a/src/ldConfig.cc	Thu Jun 05 23:18:13 2014 +0300
+++ b/src/ldConfig.cc	Sat Jun 14 09:05:29 2014 +0300
@@ -41,7 +41,7 @@
 
 // =============================================================================
 //
-void parseLDConfig()
+void LDConfigParser::parseLDConfig()
 {
 	QFile* fp = openLDrawFile ("LDConfig.ldr", false);
 
@@ -108,14 +108,14 @@
 		if (parseLDConfigTag (pars, "ALPHA", valuestr))
 			alpha = clamp (valuestr.toInt(), 0, 255);
 
-		LDColor* col = new LDColor;
-		col->name = name;
-		col->faceColor = faceColor;
-		col->edgeColor = edgeColor;
-		col->hexcode = facename;
-		col->faceColor.setAlpha (alpha);
-		col->index = code;
-		setColor (code, col);
+		LDColor col (new LDColorData);
+		col->_name = name;
+		col->_faceColor = faceColor;
+		col->_edgeColor = edgeColor;
+		col->_hexcode = facename;
+		col->_faceColor.setAlpha (alpha);
+		col->_index = code;
+		LDColor::addLDConfigColor (code, col);
 	}
 
 	fp->close();

mercurial