From 5f7dad18891d23edeafd0464cbab0368502769eb Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 21 Oct 2017 13:47:32 +0200 Subject: [PATCH] Don't do unnecessary hover checks. --- server/TracyView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index ae587596..a6aee715 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -2611,7 +2611,7 @@ void View::DrawPlotPoint( const ImVec2& wpos, float x, float y, int offset, uint draw->AddRect( wpos + ImVec2( x - 1.5f, offset + y - 1.5f ), wpos + ImVec2( x + 2.5f, offset + y + 2.5f ), color ); } - if( ImGui::IsMouseHoveringRect( wpos + ImVec2( x - 2, offset ), wpos + ImVec2( x + 2, offset + PlotHeight ) ) ) + if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( x - 2, offset ), wpos + ImVec2( x + 2, offset + PlotHeight ) ) ) { ImGui::BeginTooltip(); ImGui::Text( "Value: %s", RealToString( val, true ) );