From f2b044438d3def2e33bf5de39b5d8c6c0bf988b0 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 4 Apr 2020 02:45:01 +0200 Subject: [PATCH] Don't print empty text, just advance cursor. --- server/TracySourceView.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index 5fcb5fcb..02bb66d2 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -517,7 +517,8 @@ void SourceView::RenderLine( const Line& line, int lineNum, uint32_t ipcnt, uint { if( ipcnt == 0 ) { - ImGui::TextUnformatted( " " ); + const auto ts = ImGui::CalcTextSize( " " ); + ImGui::ItemSize( ImVec2( 7 * ts.x, ts.y ) ); } else { @@ -589,7 +590,8 @@ void SourceView::RenderAsmLine( const AsmLine& line, uint32_t ipcnt, uint32_t ip { if( ipcnt == 0 ) { - ImGui::TextUnformatted( " " ); + const auto ts = ImGui::CalcTextSize( " " ); + ImGui::ItemSize( ImVec2( 7 * ts.x, ts.y ) ); } else {