mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 04:23:51 +00:00
Fix time range limits created by reverse-mouse-drag.
This commit is contained in:
parent
e18e9411f3
commit
550e05d149
@ -773,23 +773,23 @@ bool View::DrawImpl()
|
||||
}
|
||||
if( ImGui::BeginPopup( "SetZoneRange" ) )
|
||||
{
|
||||
const auto s = std::min( m_setRangePopup.min, m_setRangePopup.max );
|
||||
const auto e = std::max( m_setRangePopup.min, m_setRangePopup.max );
|
||||
if( ImGui::Selectable( ICON_FA_SEARCH " Limit find zone time range" ) )
|
||||
{
|
||||
m_findZone.range.active = true;
|
||||
m_findZone.range.min = m_setRangePopup.min;
|
||||
m_findZone.range.max = m_setRangePopup.max;
|
||||
m_findZone.range.min = s;
|
||||
m_findZone.range.max = e;
|
||||
}
|
||||
if( ImGui::Selectable( ICON_FA_SORT_AMOUNT_UP " Limit statistics time range" ) )
|
||||
{
|
||||
m_statRange.active = true;
|
||||
m_statRange.min = m_setRangePopup.min;
|
||||
m_statRange.max = m_setRangePopup.max;
|
||||
m_statRange.min = s;
|
||||
m_statRange.max = e;
|
||||
}
|
||||
if( ImGui::Selectable( ICON_FA_STICKY_NOTE " Add annotation" ) )
|
||||
{
|
||||
auto ann = std::make_unique<Annotation>();
|
||||
const auto s = std::min( m_setRangePopup.min, m_setRangePopup.max );
|
||||
const auto e = std::max( m_setRangePopup.min, m_setRangePopup.max );
|
||||
ann->range.active = true;
|
||||
ann->range.min = s;
|
||||
ann->range.max = e;
|
||||
|
Loading…
x
Reference in New Issue
Block a user