mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 20:53:52 +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();
|
ImGui::SameLine();
|
||||||
if( ImGui::Checkbox( "Limit range", &m_findZone.range.active ) )
|
if( ImGui::Checkbox( "Limit range", &m_findZone.range.active ) )
|
||||||
{
|
{
|
||||||
m_findZone.ResetMatch();
|
|
||||||
if( m_findZone.range.active )
|
if( m_findZone.range.active )
|
||||||
{
|
{
|
||||||
m_findZone.range.min = m_vd.zvStart;
|
m_findZone.range.min = m_vd.zvStart;
|
||||||
@ -9000,12 +8999,17 @@ void View::DrawFindZone()
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if( ImGui::SmallButton( "Limit to view" ) )
|
if( ImGui::SmallButton( "Limit to view" ) )
|
||||||
{
|
{
|
||||||
m_findZone.ResetMatch();
|
|
||||||
m_findZone.range.min = m_vd.zvStart;
|
m_findZone.range.min = m_vd.zvStart;
|
||||||
m_findZone.range.max = m_vd.zvEnd;
|
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 )
|
if( findClicked )
|
||||||
{
|
{
|
||||||
m_findZone.Reset();
|
m_findZone.Reset();
|
||||||
|
@ -68,6 +68,15 @@ class View
|
|||||||
bool modMax = false;
|
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:
|
public:
|
||||||
struct VisData
|
struct VisData
|
||||||
{
|
{
|
||||||
@ -501,6 +510,7 @@ private:
|
|||||||
int64_t tmin, tmax;
|
int64_t tmin, tmax;
|
||||||
bool showZoneInFrames = false;
|
bool showZoneInFrames = false;
|
||||||
Range range;
|
Range range;
|
||||||
|
RangeSlim rangeSlim;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user