From e95ca3930d443fccf2f0b8cb7c80be9828e3de81 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 20 Jun 2018 14:50:07 +0200 Subject: [PATCH] Make all allocation list alloc/free buttons clickable. --- server/TracyView.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index ffc5bdb3..dd722dc3 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -4986,10 +4986,12 @@ void View::ListMemData( T ptr, T end, std::function DrawAdd ImGui::PushStyleColor( ImGuiCol_ButtonHovered, (ImVec4)ImColor::HSV( 0.f, 0.7f, 0.7f ) ); ImGui::PushStyleColor( ImGuiCol_ButtonActive, (ImVec4)ImColor::HSV( 0.f, 0.8f, 0.8f ) ); } + ImGui::PushID( idx++ ); if( ImGui::SmallButton( "alloc" ) ) { m_callstackInfoWindow = v->csAlloc; } + ImGui::PopID(); if( hilite ) { ImGui::PopStyleColor( 3 ); @@ -5015,10 +5017,12 @@ void View::ListMemData( T ptr, T end, std::function DrawAdd ImGui::PushStyleColor( ImGuiCol_ButtonHovered, (ImVec4)ImColor::HSV( 0.f, 0.7f, 0.7f ) ); ImGui::PushStyleColor( ImGuiCol_ButtonActive, (ImVec4)ImColor::HSV( 0.f, 0.8f, 0.8f ) ); } + ImGui::PushID( idx++ ); if( ImGui::SmallButton( "free" ) ) { m_callstackInfoWindow = v->csFree; } + ImGui::PopID(); if( hilite ) { ImGui::PopStyleColor( 3 );