Sketcher: Use constant for Type::BadType instead Type::badType()

This commit is contained in:
Benjamin Nauck
2025-02-13 22:11:46 +01:00
parent d8449eaecf
commit 9c173d2b35
2 changed files with 5 additions and 5 deletions

View File

@@ -1526,7 +1526,7 @@ public:
selIdPair.GeoId = GeoEnum::GeoUndef;
selIdPair.PosId = Sketcher::PointPos::none;
std::stringstream ss;
Base::Type newselGeoType = Base::Type::badType();
Base::Type newselGeoType = Base::Type::BadType;
int VtId = getPreselectPoint();
int CrvId = getPreselectCurve();
@@ -1662,7 +1662,7 @@ protected:
SelIdPair selIdPair;
getIdsFromName(selElement, Obj, selIdPair.GeoId, selIdPair.PosId);
Base::Type newselGeoType = Base::Type::badType();
Base::Type newselGeoType = Base::Type::BadType;
if (isEdge(selIdPair.GeoId, selIdPair.PosId)) {
const Part::Geometry* geo = Obj->getGeometry(selIdPair.GeoId);
newselGeoType = geo->getTypeId();

View File

@@ -463,7 +463,7 @@ private:
icons.emplace(
std::piecewise_construct,
std::forward_as_tuple(Base::Type::badType()),
std::forward_as_tuple(Base::Type::BadType),
std::forward_as_tuple(
std::initializer_list<
std::pair<const Sketcher::PointPos, std::tuple<QIcon, QIcon, QIcon, QIcon>>> {
@@ -479,14 +479,14 @@ private:
auto typekey = icons.find(type);
if (typekey == icons.end()) {// Not supported Geometry Type - Defaults to invalid icon
typekey = icons.find(Base::Type::badType());
typekey = icons.find(Base::Type::BadType);
pos = Sketcher::PointPos::none;
}
auto poskey = typekey->second.find(pos);
if (poskey == typekey->second.end()) {// invalid PointPos for type - Provide Invalid icon
typekey = icons.find(Base::Type::badType());
typekey = icons.find(Base::Type::BadType);
pos = Sketcher::PointPos::none;
poskey = typekey->second.find(pos);
}