1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 20:33:52 +00:00

Remove "Go to frame" button.

This commit is contained in:
Bartosz Taudul 2021-11-13 15:13:35 +01:00
parent 81c66ad126
commit 601f0a17df
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -971,16 +971,10 @@ bool View::DrawImpl()
const bool mainFrameSet = m_frames->name == 0; const bool mainFrameSet = m_frames->name == 0;
const auto numFrames = mainFrameSet ? m_frames->frames.size() - 1 : m_frames->frames.size(); const auto numFrames = mainFrameSet ? m_frames->frames.size() - 1 : m_frames->frames.size();
const auto frameOffset = mainFrameSet ? 0 : 1; const auto frameOffset = mainFrameSet ? 0 : 1;
bool goClicked = false;
ImGui::SetNextItemWidth( 120 ); 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 ) ); frameNum = std::min( std::max( frameNum, 1 ), int( numFrames ) );
ImGui::SameLine(); if( clicked ) ZoomToRange( m_worker.GetFrameBegin( *m_frames, frameNum - frameOffset ), m_worker.GetFrameEnd( *m_frames, frameNum - frameOffset ) );
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 ) );
}
ImGui::EndPopup(); ImGui::EndPopup();
} }