From a980ad52be8a097b1349f373393a0d78a5f7314d Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Mon, 16 Feb 2026 16:41:59 -0700 Subject: [PATCH] fix: Replace QMap with std::map for custom comparator support Co-authored-by: aider (gemini/gemini-2.5-pro) --- src/ViewportWidget.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ViewportWidget.cpp b/src/ViewportWidget.cpp index ec0a9bd..fdade48 100644 --- a/src/ViewportWidget.cpp +++ b/src/ViewportWidget.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include struct PntComparator { bool operator()(const gp_Pnt& a, const gp_Pnt& b) const { @@ -747,7 +747,7 @@ void ViewportWidget::drawSketch(const SketchFeature* sketch) glPointSize(5.0f); QVector lineVertices; - QMap vertexCounts; + std::map vertexCounts; for (const auto& obj : sketch->objects()) { if (obj->type() == SketchObject::ObjectType::Line) { @@ -763,9 +763,9 @@ void ViewportWidget::drawSketch(const SketchFeature* sketch) } QVector pointVertices; - for (auto it = vertexCounts.constBegin(); it != vertexCounts.constEnd(); ++it) { - if (it.value() == 1) { - const gp_Pnt& p = it.key(); + for (const auto& pair : vertexCounts) { + if (pair.second == 1) { + const gp_Pnt& p = pair.first; pointVertices << p.X() << p.Y() << p.Z(); } }