99 default: |
99 default: |
100 { |
100 { |
101 // Determine a common type for these objects. If all objects are of the same |
101 // Determine a common type for these objects. If all objects are of the same |
102 // type, we display its addition icon. Otherwise, we draw a subfile addition |
102 // type, we display its addition icon. Otherwise, we draw a subfile addition |
103 // one as a default. |
103 // one as a default. |
104 LDObjectType_e eCommonType = OBJ_Unidentified; |
104 LDObject::Type eCommonType = LDObject::Unidentified; |
105 for (LDObject* obj : subentry->paObjs) { |
105 for (LDObject* obj : subentry->paObjs) { |
106 if (eCommonType == OBJ_Unidentified or obj->getType() == eCommonType) |
106 if (eCommonType == LDObject::Unidentified or obj->getType() == eCommonType) |
107 eCommonType = obj->getType (); |
107 eCommonType = obj->getType (); |
108 else { |
108 else { |
109 eCommonType = OBJ_Unidentified; |
109 eCommonType = LDObject::Unidentified; |
110 break; |
110 break; |
111 } |
111 } |
112 } |
112 } |
113 |
113 |
114 // Set the icon based on the common type decided above. |
114 // Set the icon based on the common type decided above. |
115 if (eCommonType == OBJ_Unidentified) |
115 if (eCommonType == LDObject::Unidentified) |
116 entryIcon = getIcon ("add-subfile"); |
116 entryIcon = getIcon ("add-subfile"); |
117 else |
117 else |
118 entryIcon = getIcon (fmt ("add-%s", g_saObjTypeIcons[eCommonType])); |
118 entryIcon = getIcon (fmt ("add-%s", g_saObjTypeIcons[eCommonType])); |
119 } |
119 } |
120 break; |
120 break; |