mirror of
https://github.com/wolfpld/tracy.git
synced 2026-10-25 10:10:50 +00:00
Add option to reset compare time range limits.
This commit is contained in:
@@ -345,6 +345,12 @@ void View::DrawCompare()
|
||||
ImGui::SameLine();
|
||||
if( ImGui::SmallButton( ICON_FA_COPY " Copy from##this" ) ) ImGui::OpenPopup( "compareCopyFromThis" );
|
||||
ImGui::SameLine();
|
||||
if( ImGui::SmallButton( "Reset##this" ) )
|
||||
{
|
||||
m_compare.range[0].min = m_worker.GetFirstTime();
|
||||
m_compare.range[0].max = m_worker.GetLastTime();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
TextDisabledUnformatted( "This range:" );
|
||||
ImGui::SameLine();
|
||||
ImGui::Text( "%s - %s (%s)", TimeToStringExact( m_compare.range[0].min ), TimeToStringExact( m_compare.range[0].max ), TimeToString( m_compare.range[0].max - m_compare.range[0].min ) );
|
||||
@@ -353,6 +359,12 @@ void View::DrawCompare()
|
||||
ImGui::SameLine();
|
||||
if( ImGui::SmallButton( ICON_FA_COPY " Copy from##ext" ) ) ImGui::OpenPopup( "compareCopyFromExt" );
|
||||
ImGui::SameLine();
|
||||
if( ImGui::SmallButton( "Reset##ext" ) )
|
||||
{
|
||||
m_compare.range[1].min = m_compare.second->GetFirstTime();
|
||||
m_compare.range[1].max = m_compare.second->GetLastTime();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
TextDisabledUnformatted( "External range:" );
|
||||
ImGui::SameLine();
|
||||
ImGui::Text( "%s - %s (%s)", TimeToStringExact( m_compare.range[1].min ), TimeToStringExact( m_compare.range[1].max ), TimeToString( m_compare.range[1].max - m_compare.range[1].min ) );
|
||||
|
||||
Reference in New Issue
Block a user