message: Sync event list to first event in gfx context or first hovered event
diff: @@ -1244,14 +1244,7 @@ void TraceWin::set_mouse_graph_tooltip( class graph_info_t &gi, int64_t mouse_ts
  time_buf += "\nNext vblank: " + ts_to_timestr( next_vblank_ts, 0, 2 );
  }
  - if ( m_loader.get_opt( OPT_SyncEventListToGraph ) &&
  - m_show_eventlist &&
  - ( !gi.hovered_items.empty() || is_valid_id( gi.hovered_graph_event ) ) )
  - {
  - m_do_gotoevent = true;
  - m_goto_eventid = is_valid_id( gi.hovered_graph_event ) ?
  - gi.hovered_graph_event : gi.hovered_items[ 0 ].eventid;
  - }
  + bool sync_event_list_to_graph = m_loader.get_opt( OPT_SyncEventListToGraph ) && m_show_eventlist;
  if ( is_valid_id( gi.hovered_graph_event ) )
  {
  @@ -1259,6 +1252,13 @@ void TraceWin::set_mouse_graph_tooltip( class graph_info_t &gi, int64_t mouse_ts
  std::string context = get_event_gfxcontext_str( event_hov );
  const std::vector< uint32_t > *plocs = m_trace_events->get_gfxcontext_locs( context.c_str() );
  + if ( sync_event_list_to_graph )
  + {
  + // Sync event list to first event id in this context
  + m_do_gotoevent = true;
  + m_goto_eventid = plocs->at( 0 );
  + }
  +
  time_buf += string_format( "\n%s [%s]", event_hov.user_comm, context.c_str() );
  for ( uint32_t id : *plocs )
  @@ -1270,6 +1270,14 @@ void TraceWin::set_mouse_graph_tooltip( class graph_info_t &gi, int64_t mouse_ts
  }
  }
  + if ( sync_event_list_to_graph &&
  + !m_do_gotoevent &&
  + !gi.hovered_items.empty() )
  + {
  + m_do_gotoevent = true;
  + m_goto_eventid = gi.hovered_items[ 0 ].eventid;
  + }
  +
  //$ TODO: sort hovered_items by id and display them.
  //$ TODO: faint glow over all events in the tooltip?
  //$ TODO: add ms after times in tooltip
  