mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Fix drawing of last frame.
This commit is contained in:
parent
3d75eb50bf
commit
6b8a3b25ba
@ -6303,7 +6303,6 @@ void View::ZoomToNextFrame()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
frame = m_worker.GetFrameRange( *m_frames, m_zvStart, m_zvStart ).first;
|
frame = m_worker.GetFrameRange( *m_frames, m_zvStart, m_zvStart ).first;
|
||||||
if( frame == -1 ) return;
|
|
||||||
}
|
}
|
||||||
frame++;
|
frame++;
|
||||||
if( frame >= m_worker.GetFrameCount( *m_frames ) ) return;
|
if( frame >= m_worker.GetFrameCount( *m_frames ) ) return;
|
||||||
|
@ -889,8 +889,9 @@ int64_t Worker::GetFrameEnd( const FrameData& fd, size_t idx ) const
|
|||||||
|
|
||||||
std::pair <int, int> Worker::GetFrameRange( const FrameData& fd, int64_t from, int64_t to )
|
std::pair <int, int> Worker::GetFrameRange( const FrameData& fd, int64_t from, int64_t to )
|
||||||
{
|
{
|
||||||
const auto zitbegin = std::lower_bound( fd.frames.begin(), fd.frames.end(), from );
|
auto zitbegin = std::lower_bound( fd.frames.begin(), fd.frames.end(), from );
|
||||||
if( zitbegin == fd.frames.end() ) return std::make_pair( -1, -1 );
|
if( zitbegin == fd.frames.end() ) zitbegin--;
|
||||||
|
|
||||||
const auto zitend = std::lower_bound( zitbegin, fd.frames.end(), to );
|
const auto zitend = std::lower_bound( zitbegin, fd.frames.end(), to );
|
||||||
|
|
||||||
int zbegin = std::distance( fd.frames.begin(), zitbegin );
|
int zbegin = std::distance( fd.frames.begin(), zitbegin );
|
||||||
|
Loading…
Reference in New Issue
Block a user