[aseprite] 180/250: Minor change in Widget::scrollRegion() to avoid an extra Region::offset()

Tobias Hansen thansen at moszumanska.debian.org
Sun Dec 20 15:27:28 UTC 2015


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository aseprite.

commit 0900019b1e20a285cd51f1053d6bf579cebe94b2
Author: David Capello <davidcapello at gmail.com>
Date:   Wed Oct 14 18:41:56 2015 -0300

    Minor change in Widget::scrollRegion() to avoid an extra Region::offset()
---
 src/ui/widget.cpp | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/ui/widget.cpp b/src/ui/widget.cpp
index e294a67..01d5697 100644
--- a/src/ui/widget.cpp
+++ b/src/ui/widget.cpp
@@ -1051,18 +1051,15 @@ void Widget::scrollRegion(const Region& region, const Point& delta)
   Region reg2 = region;
   reg2.offset(delta);
   reg2.createIntersection(reg2, region);
-  reg2.offset(-delta);
-
-  // Move screen pixels
-  ui::move_region(getManager(), reg2, delta.x, delta.y);
-
-  reg2.offset(delta);
 
   m_updateRegion.createUnion(m_updateRegion, region);
   m_updateRegion.createSubtraction(m_updateRegion, reg2);
-
   mark_dirty_flag(this);
 
+  // Move screen pixels
+  reg2.offset(-delta);
+  ui::move_region(getManager(), reg2, delta.x, delta.y);
+
   // Generate the kPaintMessage messages for the widget's m_updateRegion
   flushRedraw();
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git



More information about the Pkg-games-commits mailing list