From 601f0a17df79b73ccdff8dec7536fce331377b14 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 13 Nov 2021 15:13:35 +0100 Subject: [PATCH] Remove "Go to frame" button. --- server/TracyView.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 70367eab..e0273f16 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -971,16 +971,10 @@ bool View::DrawImpl() const bool mainFrameSet = m_frames->name == 0; const auto numFrames = mainFrameSet ? m_frames->frames.size() - 1 : m_frames->frames.size(); const auto frameOffset = mainFrameSet ? 0 : 1; - bool goClicked = false; ImGui::SetNextItemWidth( 120 ); - goClicked |= ImGui::InputInt( "##goToFrame", &frameNum, 1, 100, ImGuiInputTextFlags_EnterReturnsTrue ); + const bool clicked = ImGui::InputInt( "##goToFrame", &frameNum, 1, 100, ImGuiInputTextFlags_EnterReturnsTrue ); frameNum = std::min( std::max( frameNum, 1 ), int( numFrames ) ); - ImGui::SameLine(); - goClicked |= ImGui::Button( ICON_FA_CROSSHAIRS " Go to frame" ); - if( goClicked ) - { - ZoomToRange( m_worker.GetFrameBegin( *m_frames, frameNum - frameOffset ), m_worker.GetFrameEnd( *m_frames, frameNum - frameOffset ) ); - } + if( clicked ) ZoomToRange( m_worker.GetFrameBegin( *m_frames, frameNum - frameOffset ), m_worker.GetFrameEnd( *m_frames, frameNum - frameOffset ) ); ImGui::EndPopup(); }