| 207 | } |
| 208 | |
| 209 | void APIInspector::fillAPIView() |
| 210 | { |
| 211 | ui->apiEvents->setUpdatesEnabled(false); |
| 212 | ui->apiEvents->clear(); |
| 213 | |
| 214 | m_Chunks.clear(); |
| 215 | |
| 216 | const ActionDescription *action = m_Ctx.CurSelectedAction(); |
| 217 | |
| 218 | if(action != NULL && !action->events.isEmpty()) |
| 219 | { |
| 220 | if(action->IsFakeMarker()) |
| 221 | { |
| 222 | RDTreeWidgetItem *root = new RDTreeWidgetItem({lit("---"), QString(action->customName)}); |
| 223 | root->setBold(true); |
| 224 | ui->apiEvents->addTopLevelItem(root); |
| 225 | ui->apiEvents->setSelectedItem(root); |
| 226 | } |
| 227 | else |
| 228 | { |
| 229 | for(const APIEvent &ev : action->events) |
| 230 | { |
| 231 | addEvent(ev, ev.eventId == action->eventId); |
| 232 | } |
| 233 | } |
| 234 | } |
| 235 | else |
| 236 | { |
| 237 | APIEvent ev = m_Ctx.GetEventBrowser()->GetAPIEventForEID(m_Ctx.CurSelectedEvent()); |
| 238 | |
| 239 | if(ev.eventId > 0) |
| 240 | addEvent(ev, true); |
| 241 | } |
| 242 | |
| 243 | ui->apiEvents->setUpdatesEnabled(true); |
| 244 | } |
| 245 | |
| 246 | void APIInspector::addEvent(const APIEvent &ev, bool primary) |
| 247 | { |
nothing calls this directly
no test coverage detected