Skip to content

Commit

Permalink
Updated GNEViewNet(). Refs #13667
Browse files Browse the repository at this point in the history
  • Loading branch information
palvarezlopez committed Jul 26, 2023
1 parent 5d08aa5 commit d056679
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/netedit/GNEViewNet.cpp
Expand Up @@ -2425,7 +2425,9 @@ GNEViewNet::onCmdSimplifyShape(FXObject*, FXSelector, void*) {
// iterate over shapes
for (const auto& selectedShape : selectedShapes) {
// check if shape is a poly
if (selectedShape->getTagProperty().getTag() == SUMO_TAG_POLY) {
if ((selectedShape->getTagProperty().getTag() == SUMO_TAG_POLY) ||
(selectedShape->getTagProperty().getTag() == GNE_TAG_WALKABLEAREA) ||
(selectedShape->getTagProperty().getTag() == GNE_TAG_OBSTACLE)) {
// simplify shape
dynamic_cast<GNEPoly*>(selectedShape)->simplifyShape();
}
Expand Down Expand Up @@ -2467,7 +2469,9 @@ GNEViewNet::onCmdClosePolygon(FXObject*, FXSelector, void*) {
// iterate over shapes
for (const auto& selectedShape : selectedShapes) {
// check if shape is a poly
if (selectedShape->getTagProperty().getTag() == SUMO_TAG_POLY) {
if ((selectedShape->getTagProperty().getTag() == SUMO_TAG_POLY) ||
(selectedShape->getTagProperty().getTag() == GNE_TAG_WALKABLEAREA) ||
(selectedShape->getTagProperty().getTag() == GNE_TAG_OBSTACLE)) {
// close polygon
dynamic_cast<GNEPoly*>(selectedShape)->closePolygon();
}
Expand Down Expand Up @@ -2498,7 +2502,9 @@ GNEViewNet::onCmdOpenPolygon(FXObject*, FXSelector, void*) {
// iterate over shapes
for (const auto& selectedShape : selectedShapes) {
// check if shape is a poly
if (selectedShape->getTagProperty().getTag() == SUMO_TAG_POLY) {
if ((selectedShape->getTagProperty().getTag() == SUMO_TAG_POLY) ||
(selectedShape->getTagProperty().getTag() == GNE_TAG_WALKABLEAREA) ||
(selectedShape->getTagProperty().getTag() == GNE_TAG_OBSTACLE)) {
// open polygon
dynamic_cast<GNEPoly*>(selectedShape)->openPolygon();
}
Expand Down

0 comments on commit d056679

Please sign in to comment.