mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Highlight zone from zone list on histogram.
This commit is contained in:
parent
086c9ce4c8
commit
17afcbce4f
@ -2056,6 +2056,7 @@ void View::DrawZones()
|
||||
m_drawThreadHighlight.Decay( 0 );
|
||||
m_cpuDataThread.Decay( 0 );
|
||||
m_zoneHover = nullptr;
|
||||
m_zoneHover2.Decay( nullptr );
|
||||
|
||||
if( m_vd.zvStart == m_vd.zvEnd ) return;
|
||||
assert( m_vd.zvStart < m_vd.zvEnd );
|
||||
@ -9051,9 +9052,10 @@ void View::DrawFindZone()
|
||||
draw->PopClipRect();
|
||||
}
|
||||
|
||||
if( m_zoneHover && m_findZone.match[m_findZone.selMatch] == m_zoneHover->SrcLoc() )
|
||||
if( ( m_zoneHover && m_findZone.match[m_findZone.selMatch] == m_zoneHover->SrcLoc() ) ||
|
||||
( m_zoneHover2 && m_findZone.match[m_findZone.selMatch] == m_zoneHover2->SrcLoc() ) )
|
||||
{
|
||||
const auto zoneTime = m_worker.GetZoneEnd( *m_zoneHover ) - m_zoneHover->Start();
|
||||
const auto zoneTime = m_zoneHover ? ( m_worker.GetZoneEnd( *m_zoneHover ) - m_zoneHover->Start() ) : ( m_worker.GetZoneEnd( *m_zoneHover2 ) - m_zoneHover2->Start() );
|
||||
float zonePos;
|
||||
if( m_findZone.logTime )
|
||||
{
|
||||
@ -9527,6 +9529,7 @@ void View::DrawZoneList( const Vector<short_ptr<ZoneEvent>>& zones )
|
||||
ZoomToZone( *ev );
|
||||
}
|
||||
ZoneTooltip( *ev );
|
||||
m_zoneHover2 = ev;
|
||||
}
|
||||
|
||||
ImGui::NextColumn();
|
||||
|
||||
@ -301,6 +301,7 @@ private:
|
||||
const FrameData* m_frames;
|
||||
uint32_t m_lockInfoWindow = InvalidId;
|
||||
const ZoneEvent* m_zoneHover = nullptr;
|
||||
DecayValue<const ZoneEvent*> m_zoneHover2 = nullptr;
|
||||
int m_frameHover = -1;
|
||||
bool m_messagesScrollBottom;
|
||||
ImGuiTextFilter m_messageFilter;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user