mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 06:32:42 +00:00
Minor changes in Widget::scrollRegion()
This commit is contained in:
parent
41863f9d3d
commit
b45cd3e07e
@ -1035,27 +1035,26 @@ void Widget::invalidateRegion(const Region& region)
|
||||
|
||||
void Widget::scrollRegion(const Region& region, int dx, int dy)
|
||||
{
|
||||
if (dx != 0 || dy != 0) {
|
||||
Region reg2 = region;
|
||||
reg2.offset(dx, dy);
|
||||
reg2.createIntersection(reg2, region);
|
||||
reg2.offset(-dx, -dy);
|
||||
if (dx == 0 && dy == 0)
|
||||
return;
|
||||
|
||||
// Move screen pixels
|
||||
jmouse_hide();
|
||||
ui::_move_region(reg2, dx, dy);
|
||||
jmouse_show();
|
||||
Region reg2 = region;
|
||||
reg2.offset(dx, dy);
|
||||
reg2.createIntersection(reg2, region);
|
||||
reg2.offset(-dx, -dy);
|
||||
|
||||
reg2.offset(dx, dy);
|
||||
// Move screen pixels
|
||||
ui::_move_region(reg2, dx, dy);
|
||||
|
||||
m_updateRegion.createUnion(m_updateRegion, region);
|
||||
m_updateRegion.createSubtraction(m_updateRegion, reg2);
|
||||
reg2.offset(dx, dy);
|
||||
|
||||
mark_dirty_flag(this);
|
||||
m_updateRegion.createUnion(m_updateRegion, region);
|
||||
m_updateRegion.createSubtraction(m_updateRegion, reg2);
|
||||
|
||||
// Generate the kPaintMessage messages for the widget's m_updateRegion
|
||||
flushRedraw();
|
||||
}
|
||||
mark_dirty_flag(this);
|
||||
|
||||
// Generate the kPaintMessage messages for the widget's m_updateRegion
|
||||
flushRedraw();
|
||||
}
|
||||
|
||||
class DeleteGraphicsAndBitmap {
|
||||
|
Loading…
x
Reference in New Issue
Block a user