79 if (parentTags.size() > 0) {
101 std::set<std::string> selectedItems;
104 selectedItems.insert(
myParentsList->getItem(i)->getText().text());
110 std::set<std::string> IDs;
114 const auto tagProperty =
myFrameParent->getViewNet()->getNet()->getTagPropertiesDatabase()->getTagProperty(parentTag,
true);
116 if (tagProperty->isAdditionalElement()) {
117 for (
const auto& additional :
myFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getAdditionals().at(parentTag)) {
118 IDs.insert(additional.second->getID().c_str());
123 for (
const auto& ID : IDs) {
125 if (selectedItems.find(ID) != selectedItems.end()) {
@ MID_GNE_SET_TYPE
used to select a type of element in a combo box
#define GUIDesignListFixedHeight
design for FXLists that only allow a single selected elements selected and height fixed
#define GUIDesignLabelThick(justify)
label extended over frame with thick and with text justify to left
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
FXList * myParentsList
List of parents.
GNESelectorParent(GNEFrame *frameParent)
constructor
std::vector< SumoXMLTag > myParentTags
current parent additional tag
void setIDSelected(const std::string &id)
select manually a element of the list
GNEFrame * myFrameParent
pointer to Frame Parent
void showSelectorParentModule(const std::vector< SumoXMLTag > &parentTags)
Show list of GNESelectorParent Module.
~GNESelectorParent()
destructor
void refreshSelectorParentModule()
Refresh list of Additional Parents Module.
std::string getIdSelected() const
get currently parent additional selected
void hideSelectorParentModule()
hide GNESelectorParent Module
FXLabel * myParentsLabel
Label with parent name.
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toggled)
MFXGroupBoxModule(GNEFrame *frame, const std::string &text, const int options=Options::COLLAPSIBLE)
constructor for frames