Skip to content

Commit

Permalink
now GNEPOIs and GNEPolys supports new types. Refs #13667
Browse files Browse the repository at this point in the history
  • Loading branch information
palvarezlopez committed Jul 28, 2023
1 parent de461ac commit 49e5bf3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/netedit/elements/additional/GNEPOI.cpp
Expand Up @@ -86,7 +86,7 @@ GNEPOI::GNEPOI(GNENet* net, const std::string& id, const std::string& type, cons

GNEPOI::GNEPOI(GNENet* net, const std::string& id, double x, const double y, const std::string& name, const Parameterised::Map& parameters) :
PointOfInterest(id, "jupedsim.waypoint", RGBColor::CYAN, Position(x, y), false, "", 0, false, 0, 2, 0, "", false, 0, 0, name, parameters),
GNEAdditional(id, net, GLO_POI, GNE_TAG_POIWAYPOINT, GUIIconSubSys::getIcon(GUIIcon::POIWAYPOINT),
GNEAdditional(id, net, GLO_POIWAYPOINT, GNE_TAG_POIWAYPOINT, GUIIconSubSys::getIcon(GUIIcon::POIWAYPOINT),
"", {}, {}, {}, {}, {}, {}) {
// update geometry (needed for adjust myShapeWidth and myShapeHeight)
updateGeometry();
Expand Down
6 changes: 4 additions & 2 deletions src/netedit/elements/additional/GNEPoly.cpp
Expand Up @@ -85,7 +85,9 @@ GNEPoly::GNEPoly(SumoXMLTag tag, GNENet* net, const std::string& id, const Posit
shape, false, true, 1,
(tag == GNE_TAG_WALKABLEAREA)? 1 : 2,
0, "", false, name, parameters),
GNEAdditional(id, net, GLO_POLYGON, tag,
GNEAdditional(id, net,
(tag == GNE_TAG_WALKABLEAREA)? GLO_WALKABLEAREA : GLO_OBSTACLE,
tag,
(tag == GNE_TAG_WALKABLEAREA)? GUIIconSubSys::getIcon(GUIIcon::WALKABLEAREA) : GUIIconSubSys::getIcon(GUIIcon::OBSTACLE),
"", {}, {}, {}, {}, {}, {}),
mySimplifiedShape(false) {
Expand Down Expand Up @@ -348,7 +350,7 @@ GNEPoly::drawGL(const GUIVisualizationSettings& s) const {
s.neteditSizeSettings.polygonGeometryPointRadius * (moveMode ? 1 : 0.5), polyExaggeration,
myNet->getViewNet()->getNetworkViewOptions().editingElevation(), drawExtremeSymbols);
// draw moving hint points
if (!myNet->getViewNet()->getLockManager().isObjectLocked(GLO_POLYGON, isAttributeCarrierSelected()) && moveMode) {
if (!myNet->getViewNet()->getLockManager().isObjectLocked(getType(), isAttributeCarrierSelected()) && moveMode) {
GUIGeometry::drawMovingHint(s, myNet->getViewNet()->getPositionInformation(), myPolygonGeometry.getShape(), invertedColor,
s.neteditSizeSettings.polygonGeometryPointRadius, polyExaggeration);
}
Expand Down

0 comments on commit 49e5bf3

Please sign in to comment.