From d056679e6840f2c946806fc9aa578f833ef9f946 Mon Sep 17 00:00:00 2001 From: Pablo Alvarez Lopez Date: Wed, 26 Jul 2023 16:12:00 +0200 Subject: [PATCH] Updated GNEViewNet(). Refs #13667 --- src/netedit/GNEViewNet.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/netedit/GNEViewNet.cpp b/src/netedit/GNEViewNet.cpp index ab663c7f826..3d8583ed353 100644 --- a/src/netedit/GNEViewNet.cpp +++ b/src/netedit/GNEViewNet.cpp @@ -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(selectedShape)->simplifyShape(); } @@ -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(selectedShape)->closePolygon(); } @@ -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(selectedShape)->openPolygon(); }