fix: Replace QMap with std::map for custom comparator support
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
#include <QtMath>
|
||||
#include <QOpenGLShaderProgram>
|
||||
#include <QVector>
|
||||
#include <QMap>
|
||||
#include <map>
|
||||
|
||||
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<GLfloat> lineVertices;
|
||||
QMap<gp_Pnt, int, PntComparator> vertexCounts;
|
||||
std::map<gp_Pnt, int, PntComparator> vertexCounts;
|
||||
|
||||
for (const auto& obj : sketch->objects()) {
|
||||
if (obj->type() == SketchObject::ObjectType::Line) {
|
||||
@@ -763,9 +763,9 @@ void ViewportWidget::drawSketch(const SketchFeature* sketch)
|
||||
}
|
||||
|
||||
QVector<GLfloat> 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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user