src/algorithms/invert.cpp

changeset 1412
f5eb947a2e7f
parent 1403
7a2d84112983
--- a/src/algorithms/invert.cpp	Tue Jun 19 22:45:10 2018 +0300
+++ b/src/algorithms/invert.cpp	Tue Jun 19 23:18:58 2018 +0300
@@ -17,6 +17,7 @@
  */
 
 #include "../linetypes/modelobject.h"
+#include "../linetypes/circularprimitive.h"
 #include "../lddocument.h"
 #include "../glShared.h"
 
@@ -128,6 +129,15 @@
 			reference->setInverted(not reference->isInverted());
 		}
 	}
+	else if (obj->type() == LDObjectType::CircularPrimitive)
+	{
+		auto primitive = static_cast<LDCircularPrimitive*>(obj);
+
+		if (primitive->isFlat())
+			primitive->setTransformationMatrix(primitive->transformationMatrix() * ::flipmatrix(Y));
+		else
+			primitive->setInverted(not primitive->isInverted());
+	}
 }
 
 /*

mercurial