mirror of
https://github.com/wolfpld/tracy
synced 2025-05-03 14:03:52 +00:00
Middle-click on thread label to zoom to thread extent.
This commit is contained in:
parent
62162d4cdb
commit
bf2ecbae36
@ -1860,6 +1860,16 @@ void View::DrawZones()
|
|||||||
{
|
{
|
||||||
showFull = !showFull;
|
showFull = !showFull;
|
||||||
}
|
}
|
||||||
|
if( ImGui::IsMouseClicked( 2 ) )
|
||||||
|
{
|
||||||
|
const auto t0 = v->timeline.front()->gpuStart;
|
||||||
|
if( t0 != std::numeric_limits<int64_t>::max() )
|
||||||
|
{
|
||||||
|
// FIXME
|
||||||
|
const auto t1 = std::min( m_worker.GetLastTime(), m_worker.GetZoneEnd( *v->timeline.back() ) );
|
||||||
|
ZoomToRange( t0, t1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ImGui::BeginTooltip();
|
ImGui::BeginTooltip();
|
||||||
ImGui::TextUnformatted( buf );
|
ImGui::TextUnformatted( buf );
|
||||||
@ -2059,11 +2069,6 @@ void View::DrawZones()
|
|||||||
|
|
||||||
if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( 0, oldOffset ), wpos + ImVec2( ty + txtsz.x, oldOffset + ty ) ) )
|
if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( 0, oldOffset ), wpos + ImVec2( ty + txtsz.x, oldOffset + ty ) ) )
|
||||||
{
|
{
|
||||||
if( ImGui::IsMouseClicked( 0 ) )
|
|
||||||
{
|
|
||||||
showFull = !showFull;
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::BeginTooltip();
|
ImGui::BeginTooltip();
|
||||||
ImGui::TextUnformatted( m_worker.GetThreadString( v->id ) );
|
ImGui::TextUnformatted( m_worker.GetThreadString( v->id ) );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
@ -2149,6 +2154,15 @@ void View::DrawZones()
|
|||||||
TextFocused( "Locks:", RealToString( lockCnt, true ) );
|
TextFocused( "Locks:", RealToString( lockCnt, true ) );
|
||||||
}
|
}
|
||||||
ImGui::EndTooltip();
|
ImGui::EndTooltip();
|
||||||
|
|
||||||
|
if( ImGui::IsMouseClicked( 0 ) )
|
||||||
|
{
|
||||||
|
showFull = !showFull;
|
||||||
|
}
|
||||||
|
if( last >= 0 && ImGui::IsMouseClicked( 2 ) )
|
||||||
|
{
|
||||||
|
ZoomToRange( first, last );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user