Skip to content

Commit

Permalink
Added new tag property EXTENDED. Refs #15776
Browse files Browse the repository at this point in the history
  • Loading branch information
palvarezlopez committed Nov 29, 2024
1 parent 6404d52 commit f54c515
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/netedit/elements/GNEAttributeCarrier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3702,7 +3702,7 @@ GNEAttributeCarrier::fillDemandElements() {
// set values of tag
myTagProperties[currentTag] = GNETagProperties(currentTag,
GNETagProperties::TagType::DEMANDELEMENT | GNETagProperties::TagType::VTYPE,
GNETagProperties::TagProperty::NOTDRAWABLE | GNETagProperties::TagProperty::NOTSELECTABLE | GNETagProperties::TagProperty::VCLASS_ICON,
GNETagProperties::TagProperty::NOTDRAWABLE | GNETagProperties::TagProperty::NOTSELECTABLE | GNETagProperties::TagProperty::VCLASS_ICON | GNETagProperties::TagProperty::EXTENDED,
GNETagProperties::TagParents::NO_PARENTS,
GNETagProperties::Conflicts::NO_CONFLICTS,
GUIIcon::VTYPE, currentTag, TL("VehicleType"));
Expand Down
6 changes: 6 additions & 0 deletions src/netedit/elements/GNETagProperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,12 @@ GNETagProperties::hasDialog() const {
}


bool
GNETagProperties::hasExtendedAttributes() const {
return (myTagProperty & EXTENDED) != 0;
}


bool
GNETagProperties::hasParameters() const {
// note: By default all elements support parameters, except Tags with "NOPARAMETERS"
Expand Down
8 changes: 6 additions & 2 deletions src/netedit/elements/GNETagProperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,12 @@ class GNETagProperties {
NOTSELECTABLE = 1 << 7, // Element cannot be selected
MASKSTARTENDPOS = 1 << 8, // Element mask attributes StartPos and EndPos as "length" (Only used in the appropiate GNEFrame)
NOPARAMETERS = 1 << 9, // Element doesn't accept parameters "key1=value1|key2=value2|...|keyN=valueN" (by default all tags supports parameters)
RTREE = 1 << 10, // Element is placed in RTREE
RTREE = 1 << 10, // Element is placed in RTREE
CENTERAFTERCREATION = 1 << 11, // Camera is moved after element creation
REQUIRE_PROJ = 1 << 12, // Element require a geo-projection defined in network
VCLASS_ICON = 1 << 13, // Element returns icon depending of their vClass
SYMBOL = 1 << 14, // Symbol elements (VSSSymbols, RerouterSymbols...)
SYMBOL = 1 << 14, // Element is a symbol (VSSSymbols, RerouterSymbols...)
EXTENDED = 1 << 15, // Element contains extended attributes (Usually vTypes)
};

/// @brief tag parents
Expand Down Expand Up @@ -468,6 +469,9 @@ class GNETagProperties {
/// @brief return true if tag correspond to an element that can be edited using a dialog
bool hasDialog() const;

/// @brief return true if tag correspond to an element that contains extended attributes
bool hasExtendedAttributes() const;

/// @brief return true if Tag correspond to an element that supports parameters "key1=value1|key2=value2|...|keyN=valueN"
bool hasParameters() const;

Expand Down

0 comments on commit f54c515

Please sign in to comment.