Be able to select a range of colors/tiles to the end just moving the mouse outside the palette region

This commit is contained in:
David Capello 2022-06-02 10:32:15 -03:00
parent eb4fbe9114
commit f9d0e441d3

View File

@ -667,8 +667,9 @@ bool PaletteView::onProcessMessage(Message* msg)
case kMouseMoveMessage: {
MouseMessage* mouseMsg = static_cast<MouseMessage*>(msg);
if (m_state == State::SELECTING_COLOR &&
m_hot.part == Hit::COLOR) {
if ((m_state == State::SELECTING_COLOR) &&
(m_hot.part == Hit::COLOR ||
m_hot.part == Hit::POSSIBLE_COLOR)) {
int idx = m_hot.color;
idx = base::clamp(idx, 0, std::max(0, m_adapter->size()-1));