mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 10:20:48 +00:00
Avoid redrawing the whole PaletteView when we move the mouse between color entries
This commit is contained in:
parent
559c040f63
commit
86c8bc57a5
@ -413,8 +413,13 @@ bool PaletteView::onProcessMessage(Message* msg)
|
||||
MouseMessage* mouseMsg = static_cast<MouseMessage*>(msg);
|
||||
Hit hit = hitTest(mouseMsg->position() - bounds().origin());
|
||||
if (hit != m_hot) {
|
||||
// Redraw only when we put the mouse in other part of the
|
||||
// widget (e.g. if we move from color to color, we don't want
|
||||
// to redraw the whole widget).
|
||||
if (hit.part != m_hot.part)
|
||||
invalidate();
|
||||
|
||||
m_hot = hit;
|
||||
invalidate();
|
||||
}
|
||||
setCursor();
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user