mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Dynamically adapt find zone results to range limit.
This commit is contained in:
parent
c1bf853310
commit
58428e7ede
@ -8979,7 +8979,6 @@ void View::DrawFindZone()
|
||||
ImGui::SameLine();
|
||||
if( ImGui::Checkbox( "Limit range", &m_findZone.range.active ) )
|
||||
{
|
||||
m_findZone.ResetMatch();
|
||||
if( m_findZone.range.active )
|
||||
{
|
||||
m_findZone.range.min = m_vd.zvStart;
|
||||
@ -9000,12 +8999,17 @@ void View::DrawFindZone()
|
||||
ImGui::SameLine();
|
||||
if( ImGui::SmallButton( "Limit to view" ) )
|
||||
{
|
||||
m_findZone.ResetMatch();
|
||||
m_findZone.range.min = m_vd.zvStart;
|
||||
m_findZone.range.max = m_vd.zvEnd;
|
||||
}
|
||||
}
|
||||
|
||||
if( m_findZone.rangeSlim != m_findZone.range )
|
||||
{
|
||||
m_findZone.ResetMatch();
|
||||
m_findZone.rangeSlim = m_findZone.range;
|
||||
}
|
||||
|
||||
if( findClicked )
|
||||
{
|
||||
m_findZone.Reset();
|
||||
|
@ -68,6 +68,15 @@ class View
|
||||
bool modMax = false;
|
||||
};
|
||||
|
||||
struct RangeSlim
|
||||
{
|
||||
bool operator==( const Range& other ) const { return other.active == active && other.min == min && other.max == max; }
|
||||
void operator=( const Range& other ) { active = other.active; min = other.min; max = other.max; }
|
||||
|
||||
int64_t min, max;
|
||||
bool active = false;
|
||||
};
|
||||
|
||||
public:
|
||||
struct VisData
|
||||
{
|
||||
@ -501,6 +510,7 @@ private:
|
||||
int64_t tmin, tmax;
|
||||
bool showZoneInFrames = false;
|
||||
Range range;
|
||||
RangeSlim rangeSlim;
|
||||
|
||||
struct
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user