Fri, 01 Jul 2022 13:41:46 +0300
Simplify some code
src/layers/edittools.cpp | file | annotate | diff | comparison | revisions |
--- a/src/layers/edittools.cpp Wed Jun 29 16:33:49 2022 +0300 +++ b/src/layers/edittools.cpp Fri Jul 01 13:41:46 2022 +0300 @@ -420,15 +420,7 @@ { std::vector<ModelAction> result; if (this->numpoints == 2) { - result.push_back(AppendToModel{ - .newElement = Colored<LineSegment>{ - LineSegment{ - .p1 = this->polygon[0], - .p2 = this->polygon[1], - }, - EDGE_COLOR, - } - }); + result.push_back(AppendToModel{edge(this->polygon[0], this->polygon[1])}); } else if (this->numpoints > 2) { const glm::mat4 inverseGrid = glm::inverse(this->gridMatrix);