Skip to content

Commit

Permalink
can now locate by name in netedit. refs #5270
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Mar 18, 2019
1 parent df0eba7 commit ce2477d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/netedit/additionals/GNEAdditional.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@ class GNEAdditional : public GUIGlObject, public GNEAttributeCarrier, public Par
*/
Boundary getCenteringBoundary() const;

/// @brief Returns the additional name
const std::string getOptionalName() const {
return myAdditionalName;
}

/**@brief Draws the object
* @param[in] s The settings for the current view (may influence drawing)
* @see GUIGlObject::drawGL
Expand Down
2 changes: 1 addition & 1 deletion src/netedit/dialogs/GNEDialogACChooser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ GNEDialogACChooser::getObjectName(GUIGlObject* o) const {
return tlDef->getID() + " (" + o->getMicrosimID() + ")";
}
} else {
return o->getMicrosimID();
return GUIDialog_GLObjChooser::getObjectName(o);
}
}

Expand Down
4 changes: 4 additions & 0 deletions src/netedit/netelements/GNEEdge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,10 @@ GNEEdge::getCenteringBoundary() const {
}
}

const std::string
GNEEdge::getOptionalName() const {
return myNBEdge.getStreetName();
}

GUIGLObjectPopupMenu*
GNEEdge::getPopUpMenu(GUIMainWindow& app, GUISUMOAbstractView& parent) {
Expand Down
3 changes: 3 additions & 0 deletions src/netedit/netelements/GNEEdge.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ class GNEEdge : public GNENetElement {
*/
Boundary getCenteringBoundary() const;

/// @brief Returns the street name
const std::string getOptionalName() const;

/**@brief Draws the object
* @param[in] s The settings for the current view (may influence drawing)
* @see GUIGlObject::drawGL
Expand Down

0 comments on commit ce2477d

Please sign in to comment.