Add option to reset compare time range limits.

This commit is contained in:
Bartosz Taudul
2026-07-04 22:29:14 +02:00
parent d2c69868d1
commit ae83b00951
@@ -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 ) );