From 4960e691d4b975fb803ff6eab182c813a164a5f9 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 28 Sep 2018 11:40:22 +0200 Subject: [PATCH] Added ability to zoom to allocation range in allocation window. --- server/TracyView.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 7387c618..d24b7b4e 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -6372,6 +6372,15 @@ void View::DrawMemoryAllocWindow() const auto tidFree = m_worker.DecompressThread( ev.threadFree ); int idx = 0; +#ifdef TRACY_EXTENDED_FONT + if( ImGui::Button( ICON_FA_MICROSCOPE " Zoom to allocation" ) ) +#else + if( ImGui::Button( "Zoom to allocation" ) ) +#endif + { + ZoomToRange( ev.timeAlloc, ev.timeFree >= 0 ? ev.timeFree : m_worker.GetLastTime() ); + } + char buf[64]; sprintf( buf, "0x%" PRIx64, ev.ptr ); TextFocused( "Address:", buf );