From 072fed288a9af711fdf24085a46c8aed2a51dfa7 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 9 Apr 2020 23:12:17 +0200 Subject: [PATCH] Use left and right mouse buttons for asm navigation. Left click on source line just selects the line and the corresponding asm lines. Right click does the above and focuses asm view on the first selected line. --- server/TracySourceView.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index 671720cd..52878d2b 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -899,10 +899,10 @@ void SourceView::RenderLine( const Line& line, int lineNum, uint32_t ipcnt, uint if( match > 0 && ImGui::IsMouseHoveringRect( wpos, wpos + ImVec2( w, ty+1 ) ) ) { draw->AddRectFilled( wpos, wpos + ImVec2( w, ty+1 ), 0x11FFFFFF ); - if( ImGui::IsMouseClicked( 0 ) ) + if( ImGui::IsMouseClicked( 0 ) || ImGui::IsMouseClicked( 1 ) ) { m_displayMode = DisplayMixed; - SelectLine( lineNum, worker ); + SelectLine( lineNum, worker, ImGui::IsMouseClicked( 1 ) ); } else { @@ -1116,7 +1116,7 @@ void SourceView::SelectAsmLines( uint32_t file, uint32_t line, const Worker& wor if( addresses ) { const auto& addr = *addresses; - if( changeAsmLine && !ImGui::GetIO().KeyCtrl ) + if( changeAsmLine ) { if( targetAddr != 0 ) {