From db3736983ac74757b220cffbc1b83039f9707032 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 6 Apr 2022 02:01:07 +0200 Subject: [PATCH] Always open jump arrow context menu. --- server/TracySourceView.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index e6e0b71c..23091cc6 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -2450,13 +2450,11 @@ uint64_t SourceView::RenderSymbolAsmView( const AddrStatData& as, Worker& worker m_selectedAddresses.clear(); m_selectedAddresses.emplace( v.first ); } -#ifndef TRACY_NO_FILESELECTOR else if( ImGui::IsMouseClicked( 1 ) ) { ImGui::OpenPopup( "jumpPopup" ); m_jumpPopupAddr = v.first; } -#endif selJumpStart = v.second.min; selJumpEnd = v.second.max; selJumpTarget = v.first; @@ -2487,15 +2485,15 @@ uint64_t SourceView::RenderSymbolAsmView( const AddrStatData& as, Worker& worker } } -#ifndef TRACY_NO_FILESELECTOR UnsetFont(); if( ImGui::BeginPopup( "jumpPopup" ) ) { - if( ImGui::Button( ICON_FA_FILE_IMPORT " Save jump range" ) ) - { - auto it = m_jumpTable.find( m_jumpPopupAddr ); - assert( it != m_jumpTable.end() ); + auto it = m_jumpTable.find( m_jumpPopupAddr ); + assert( it != m_jumpTable.end() ); +#ifndef TRACY_NO_FILESELECTOR + if( ImGui::MenuItem( ICON_FA_FILE_IMPORT " Save jump range" ) ) + { size_t minIdx = 0, maxIdx = 0; size_t i; for( i=0; i