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(); }