Skip to content

Commit

Permalink
Prevent graphical glitches when Channel's tracker is below 'begin' point
Browse files Browse the repository at this point in the history
It happens after a project is loaded.
  • Loading branch information
gvnnz committed Dec 7, 2024
1 parent d12c15a commit 9a07290
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/elems/mainWindow/keyboard/channelProgress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void geChannelProgress::draw()
const Frame tracker = m_channel.sample->getTracker();
const Frame begin = m_channel.sample->begin;
const Frame end = m_channel.sample->end;
const Pixel pos = u::math::map(tracker, begin, end, 0, w());
const Pixel pos = u::math::map(std::max(tracker, begin), begin, end, 0, w());

const geompp::Rect<int> bounds(x(), y(), w(), h());

Expand Down

0 comments on commit 9a07290

Please sign in to comment.