From b7d2a690d98143adaf6b79e0e5bbbb72daa8d17b Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 28 Sep 2018 11:43:45 +0200 Subject: [PATCH] Zoom to allocation range when middle clicking on address. --- server/TracyView.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index d24b7b4e..a5572898 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -6954,6 +6954,7 @@ void View::ListMemData( T ptr, T end, std::function DrawAddress, const { ImGui::BeginTooltip(); ImGui::Text( "Click on address to display memory allocation info window." ); + ImGui::Text( "Middle click to zoom to allocation range." ); ImGui::EndTooltip(); } ImGui::NextColumn(); @@ -7028,6 +7029,10 @@ void View::ListMemData( T ptr, T end, std::function DrawAddress, const { m_memoryAllocInfoWindow = arrIdx; } + if( ImGui::IsItemClicked( 2 ) ) + { + ZoomToRange( v->timeAlloc, v->timeFree >= 0 ? v->timeFree : m_worker.GetLastTime() ); + } } if( ImGui::IsItemHovered() ) {