# HG changeset patch # User Teemu Piippo # Date 1656874142 -10800 # Node ID d9bab5d22c98c70854ba13cc736497b61d9735f0 # Parent 3c09c937848cdd67dd818613e413f1b6e57dda1c Make the extrusion axis only visible when extruding diff -r 3c09c937848c -r d9bab5d22c98 src/layers/edittools.cpp --- a/src/layers/edittools.cpp Sun Jul 03 21:47:44 2022 +0300 +++ b/src/layers/edittools.cpp Sun Jul 03 21:49:02 2022 +0300 @@ -234,7 +234,7 @@ } }; const glm::vec3 zvec = this->gridMatrix[2]; - { + if (this->inputPolygon.bufferSize() >= 3) { const glm::vec2 p1 = extremity(this->inputPolygon[0] + zvec); const glm::vec2 p2 = extremity(this->inputPolygon[0] - zvec); const glm::vec2 lateral = glm::normalize(glm::mat2{{0, 1}, {-1, 0}} * (p2 - p1)); @@ -248,8 +248,6 @@ const QPointF notch_s2 = s_notchcenter - notchsize * 0.5f * vecToQPoint(lateral); painter->drawLine(notch_s1, notch_s2); } - } - if (this->inputPolygon.polygonSize() >= 3) { const opt height = this->cylinderHeight(); if (height.has_value()) { const glm::vec3 heightvec = height.value_or(0) * zvec;