Make sure we're on a consistent event before calling OnLogFileLoaded

* Certain panels like BufferViewer assume there is a current drawcall
  at startup and not an invalid event ID like 0. Normally the event
  browser is loaded first and sets the event ID, but if it's later in
  the list this will break.
This commit is contained in:
baldurk
2017-02-01 11:17:56 +00:00
parent 0a611417c1
commit 477df04072
5 changed files with 27 additions and 13 deletions
+2 -2
View File
@@ -113,7 +113,7 @@ void EventBrowser::OnLogfileLoaded()
ui->events->expandItem(frame);
m_Ctx->SetEventID(this, lastEID, lastEID);
m_Ctx->SetEventID({this}, lastEID, lastEID);
}
void EventBrowser::OnLogfileClosed()
@@ -251,7 +251,7 @@ void EventBrowser::on_events_currentItemChanged(QTreeWidgetItem *current, QTreeW
uint EID = current->data(COL_EID, Qt::UserRole).toUInt();
uint lastEID = current->data(COL_LAST_EID, Qt::UserRole).toUInt();
m_Ctx->SetEventID(this, EID, lastEID);
m_Ctx->SetEventID({this}, EID, lastEID);
}
void EventBrowser::on_HideFindJump()