Fix find zone histogram selection start/end.

This commit is contained in:
Bartosz Taudul 2018-09-02 02:09:29 +02:00
parent 8152e213f8
commit 854210a7e3
2 changed files with 13 additions and 1 deletions

View File

@ -5017,10 +5017,21 @@ void View::DrawFindZone()
m_findZone.highlight.active = true;
m_findZone.highlight.start = t0;
m_findZone.highlight.end = t1;
m_findZone.hlOrig_t0 = t0;
m_findZone.hlOrig_t1 = t1;
}
else if( ImGui::IsMouseDragging( 0, 0 ) )
{
m_findZone.highlight.end = t1 > m_findZone.highlight.start ? t1 : t0;
if( t0 < m_findZone.hlOrig_t0 )
{
m_findZone.highlight.start = t0;
m_findZone.highlight.end = m_findZone.hlOrig_t1;
}
else
{
m_findZone.highlight.start = m_findZone.hlOrig_t0;
m_findZone.highlight.end = t1;
}
m_findZone.ResetGroups();
}
}

View File

@ -289,6 +289,7 @@ private:
GroupBy groupBy = GroupBy::Thread;
SortBy sortBy = SortBy::Order;
Region highlight;
int64_t hlOrig_t0, hlOrig_t1;
int64_t numBins = -1;
std::unique_ptr<int64_t[]> bins, binTime, selBin;
std::vector<int64_t> sorted;