mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-01 10:13:22 +00:00
Fixed: now you cannot select invalid colors with the color-bar.
This commit is contained in:
parent
2a2effa4ff
commit
a17a3de4d4
@ -427,11 +427,15 @@ bool ColorBar::msg_proc(JMessage msg)
|
||||
|
||||
default:
|
||||
color_t color = getHotColor(m_hot);
|
||||
if (msg->mouse.left) {
|
||||
this->setFgColor(color);
|
||||
}
|
||||
if (msg->mouse.right) {
|
||||
this->setBgColor(color);
|
||||
|
||||
// Check if the color is invalid (e.g. index out of range)
|
||||
if (color_is_valid(color)) {
|
||||
if (msg->mouse.left) {
|
||||
this->setFgColor(color);
|
||||
}
|
||||
if (msg->mouse.right) {
|
||||
this->setBgColor(color);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user