| 4159 | } |
| 4160 | |
| 4161 | void EventBrowser::events_currentChanged(const QModelIndex ¤t, const QModelIndex &previous) |
| 4162 | { |
| 4163 | if(!current.isValid()) |
| 4164 | return; |
| 4165 | |
| 4166 | uint32_t selectedEID = GetSelectedEID(current); |
| 4167 | uint32_t effectiveEID = GetEffectiveEID(current); |
| 4168 | |
| 4169 | if(selectedEID == m_Ctx.CurSelectedEvent() && effectiveEID == m_Ctx.CurEvent()) |
| 4170 | return; |
| 4171 | |
| 4172 | m_Ctx.SetEventID({this}, selectedEID, effectiveEID); |
| 4173 | |
| 4174 | m_Model->RefreshCache(); |
| 4175 | m_Breadcrumbs->OnEventChanged(effectiveEID); |
| 4176 | |
| 4177 | const ActionDescription *action = m_Ctx.GetAction(selectedEID); |
| 4178 | |
| 4179 | if(action && action->IsFakeMarker()) |
| 4180 | action = &action->children.back(); |
| 4181 | |
| 4182 | ui->stepPrev->setEnabled(action && action->previous); |
| 4183 | ui->stepNext->setEnabled(action && action->next); |
| 4184 | |
| 4185 | // special case for the first action in the frame |
| 4186 | if(selectedEID == 0) |
| 4187 | ui->stepNext->setEnabled(true); |
| 4188 | |
| 4189 | // special case for the first 'virtual' action at EID 0 |
| 4190 | if(m_Ctx.GetFirstAction() && selectedEID == m_Ctx.GetFirstAction()->eventId) |
| 4191 | ui->stepPrev->setEnabled(true); |
| 4192 | |
| 4193 | highlightBookmarks(); |
| 4194 | } |
| 4195 | |
| 4196 | void EventBrowser::on_HideFind() |
| 4197 | { |
nothing calls this directly
no test coverage detected