# HG changeset patch # User Santeri Piippo # Date 1386371332 -7200 # Node ID 0efe5dbcef07c9be50bd59786ad2e23a3bae19e8 # Parent d97594e3fc5454c967904f86a9750d5345d860e1 renamed LDCndLine to LDCondLine diff -r d97594e3fc54 -r 0efe5dbcef07 src/addObjectDialog.cpp --- a/src/addObjectDialog.cpp Sat Dec 07 01:03:17 2013 +0200 +++ b/src/addObjectDialog.cpp Sat Dec 07 01:08:52 2013 +0200 @@ -79,7 +79,7 @@ break; case LDObject::Quad: - case LDObject::CndLine: + case LDObject::CondLine: coordCount = 12; break; @@ -161,7 +161,7 @@ { if (obj != null) colnum = obj->getColor(); else - colnum = (type == LDObject::CndLine || type == LDObject::Line) ? edgecolor : maincolor; + colnum = (type == LDObject::CondLine || type == LDObject::Line) ? edgecolor : maincolor; pb_color = new QPushButton; setButtonBackground (pb_color, colnum); @@ -180,7 +180,7 @@ switch (type) { case LDObject::Line: - case LDObject::CndLine: + case LDObject::CondLine: case LDObject::Triangle: case LDObject::Quad: @@ -347,7 +347,7 @@ case LDObject::Line: case LDObject::Triangle: case LDObject::Quad: - case LDObject::CndLine: + case LDObject::CondLine: if (!obj) obj = LDObject::getDefault (type); diff -r d97594e3fc54 -r 0efe5dbcef07 src/file.cpp --- a/src/file.cpp Sat Dec 07 01:03:17 2013 +0200 +++ b/src/file.cpp Sat Dec 07 01:08:52 2013 +0200 @@ -808,7 +808,7 @@ if (num == 4) obj = new LDQuad; else - obj = new LDCndLine; + obj = new LDCondLine; obj->setColor (tokens[1].toLong()); diff -r d97594e3fc54 -r 0efe5dbcef07 src/gldraw.cpp --- a/src/gldraw.cpp Sat Dec 07 01:03:17 2013 +0200 +++ b/src/gldraw.cpp Sat Dec 07 01:08:52 2013 +0200 @@ -287,7 +287,7 @@ if ((list == BFCFrontList || list == BFCBackList) && obj->getType() != LDObject::Line && - obj->getType() != LDObject::CndLine) + obj->getType() != LDObject::CondLine) { if (list == GL::BFCFrontList) qcol = QColor (40, 192, 0); else @@ -839,7 +839,7 @@ void GLRenderer::compileSubObject (LDObject* obj, const GLenum gltype) { glBegin (gltype); - const int numverts = (obj->getType() != LDObject::CndLine) ? obj->vertices() : 2; + const int numverts = (obj->getType() != LDObject::CondLine) ? obj->vertices() : 2; if (g_glInvert == false) for (int i = 0; i < numverts; ++i) @@ -861,7 +861,7 @@ compileSubObject (obj, GL_LINES); break; - case LDObject::CndLine: + case LDObject::CondLine: // Draw conditional lines with a dash pattern - however, use a full // line when drawing a pick list to make selecting them easier. diff -r d97594e3fc54 -r 0efe5dbcef07 src/gui.cpp --- a/src/gui.cpp Sat Dec 07 01:03:17 2013 +0200 +++ b/src/gui.cpp Sat Dec 07 01:08:52 2013 +0200 @@ -306,7 +306,7 @@ case LDObject::Line: case LDObject::Triangle: case LDObject::Quad: - case LDObject::CndLine: + case LDObject::CondLine: { for (int i = 0; i < obj->vertices(); ++i) { if (i != 0) descr += ", "; diff -r d97594e3fc54 -r 0efe5dbcef07 src/gui_actions.cpp --- a/src/gui_actions.cpp Sat Dec 07 01:03:17 2013 +0200 +++ b/src/gui_actions.cpp Sat Dec 07 01:08:52 2013 +0200 @@ -207,7 +207,7 @@ // ============================================================================= // ----------------------------------------------------------------------------- DEFINE_ACTION (NewCLine, 0) -{ AddObjectDialog::staticDialog (LDObject::CndLine, null); +{ AddObjectDialog::staticDialog (LDObject::CondLine, null); } // ============================================================================= diff -r d97594e3fc54 -r 0efe5dbcef07 src/gui_editactions.cpp --- a/src/gui_editactions.cpp Sat Dec 07 01:03:17 2013 +0200 +++ b/src/gui_editactions.cpp Sat Dec 07 01:08:52 2013 +0200 @@ -555,7 +555,7 @@ int col = maincolor; - if (obj->getType() == LDObject::Line || obj->getType() == LDObject::CndLine) + if (obj->getType() == LDObject::Line || obj->getType() == LDObject::CondLine) col = edgecolor; obj->setColor (col); @@ -652,10 +652,10 @@ int num = 0; for (LDObject* obj : sel) - { if (obj->getType() != LDObject::CndLine) + { if (obj->getType() != LDObject::CondLine) continue; - LDLine* repl = static_cast (obj)->demote(); + LDLine* repl = static_cast (obj)->demote(); g_win->R()->compileObject (repl); ++num; } diff -r d97594e3fc54 -r 0efe5dbcef07 src/ldtypes.cpp --- a/src/ldtypes.cpp Sat Dec 07 01:03:17 2013 +0200 +++ b/src/ldtypes.cpp Sat Dec 07 01:08:52 2013 +0200 @@ -146,7 +146,7 @@ // ============================================================================= // ----------------------------------------------------------------------------- -str LDCndLine::raw() +str LDCondLine::raw() { str val = fmt ("5 %1", getColor()); // Add the coordinates @@ -284,7 +284,7 @@ static void transformObject (LDObject* obj, matrix transform, vertex pos, int parentcolor) { switch (obj->getType()) { case LDObject::Line: - case LDObject::CndLine: + case LDObject::CondLine: case LDObject::Triangle: case LDObject::Quad: @@ -523,7 +523,7 @@ // ============================================================================= // ----------------------------------------------------------------------------- -void LDCndLine::move (vertex vect) +void LDCondLine::move (vertex vect) { for (int i = 0; i < 4; ++i) setVertex (i, getVertex (i) + vect); } @@ -538,7 +538,7 @@ { CHECK_FOR_OBJ (Comment) CHECK_FOR_OBJ (BFC) CHECK_FOR_OBJ (Line) - CHECK_FOR_OBJ (CndLine) + CHECK_FOR_OBJ (CondLine) CHECK_FOR_OBJ (Subfile) CHECK_FOR_OBJ (Triangle) CHECK_FOR_OBJ (Quad) @@ -622,7 +622,7 @@ { invertLine (this); } -void LDCndLine::invert() +void LDCondLine::invert() { invertLine (this); } @@ -630,7 +630,7 @@ // ============================================================================= // ----------------------------------------------------------------------------- -LDLine* LDCndLine::demote() +LDLine* LDCondLine::demote() { LDLine* repl = new LDLine; for (int i = 0; i < repl->vertices(); ++i) diff -r d97594e3fc54 -r 0efe5dbcef07 src/ldtypes.h --- a/src/ldtypes.h Sat Dec 07 01:03:17 2013 +0200 +++ b/src/ldtypes.h Sat Dec 07 01:08:52 2013 +0200 @@ -77,7 +77,7 @@ Quad, // Object represents a quadrilateral Triangle, // Object represents a triangle Line, // Object represents a line - CndLine, // Object represents a conditional line + CondLine, // Object represents a conditional line Vertex, // Object is a vertex, LDForge extension object BFC, // Object represents a BFC statement Overlay, // Object contains meta-info about an overlay image. @@ -363,13 +363,13 @@ }; // ============================================================================= -// LDCndLine +// LDCondLine // // Represents a single code-5 conditional line. The end-points v0 and v1 are // inherited from LDLine, c0 and c1 are the control points of this line. // ============================================================================= -class LDCndLine : public LDLine -{ LDOBJ (CndLine) +class LDCondLine : public LDLine +{ LDOBJ (CondLine) LDOBJ_NAME (condline) LDOBJ_VERTICES (4) LDOBJ_COLORED @@ -377,7 +377,7 @@ LDOBJ_NO_MATRIX public: - LDCndLine() {} + LDCondLine() {} LDLine* demote(); }; diff -r d97594e3fc54 -r 0efe5dbcef07 src/primitives.cpp --- a/src/primitives.cpp Sat Dec 07 01:03:17 2013 +0200 +++ b/src/primitives.cpp Sat Dec 07 01:08:52 2013 +0200 @@ -443,7 +443,7 @@ v0[Z] *= num; } - LDCndLine* line = new LDCndLine; + LDCondLine* line = new LDCondLine; line->setColor (edgecolor); line->setVertex (0, v0); line->setVertex (1, v1); diff -r d97594e3fc54 -r 0efe5dbcef07 src/types.cpp --- a/src/types.cpp Sat Dec 07 01:03:17 2013 +0200 +++ b/src/types.cpp Sat Dec 07 01:08:52 2013 +0200 @@ -524,7 +524,7 @@ { case LDObject::Line: case LDObject::Triangle: case LDObject::Quad: - case LDObject::CndLine: + case LDObject::CondLine: { for (int i = 0; i < obj->vertices(); ++i) calcVertex (obj->getVertex (i)); } break;