mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Use vStart retrieved from ctx.
This commit is contained in:
parent
1e67c8bce2
commit
a3947fbc57
@ -308,8 +308,8 @@ void View::DrawContextSwitchList( const TimelineContext& ctx, const std::vector<
|
|||||||
case ContextSwitchDrawType::Running:
|
case ContextSwitchDrawType::Running:
|
||||||
{
|
{
|
||||||
const auto end = ev.IsEndValid() ? ev.End() : m_worker.GetLastTime();
|
const auto end = ev.IsEndValid() ? ev.End() : m_worker.GetLastTime();
|
||||||
const auto px0 = std::max( { ( ev.Start() - m_vd.zvStart ) * pxns, -10.0, double( v.minpx ) } );
|
const auto px0 = std::max( { ( ev.Start() - vStart ) * pxns, -10.0, double( v.minpx ) } );
|
||||||
const auto px1 = std::min( ( end - m_vd.zvStart ) * pxns, w + 10.0 );
|
const auto px1 = std::min( ( end - vStart ) * pxns, w + 10.0 );
|
||||||
DrawLine( draw, dpos + ImVec2( px0, offset + ty05 - 0.5f ), dpos + ImVec2( px1, offset + ty05 - 0.5f ), 0xFF22DD22, lineSize );
|
DrawLine( draw, dpos + ImVec2( px0, offset + ty05 - 0.5f ), dpos + ImVec2( px1, offset + ty05 - 0.5f ), 0xFF22DD22, lineSize );
|
||||||
if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + ty + 1 ) ) )
|
if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + ty + 1 ) ) )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user