src/ldtypes.cpp

changeset 275
7b5afec27688
parent 274
d232fe4d88a6
child 276
a21e49914264
--- a/src/ldtypes.cpp	Thu Jun 13 00:48:53 2013 +0300
+++ b/src/ldtypes.cpp	Thu Jun 13 01:13:06 2013 +0300
@@ -802,4 +802,17 @@
 	
 	replace (repl);
 	return repl;
+}
+
+READ_ACCESSOR (short, LDObject::color) { return m_color; }
+SET_ACCESSOR (short, LDObject::setColor) {
+	long idx;
+	if ((idx = getIndex (g_curfile)) != -1) {
+		str before = raw ();
+		m_color = val;
+		str after = raw ();
+		
+		g_curfile->addToHistory (new EditHistory (idx, before, after));
+	} else
+		m_color = val;
 }
\ No newline at end of file

mercurial