[aseprite] 49/250: Minor changes in Timeline::showCel()
Tobias Hansen
thansen at moszumanska.debian.org
Sun Dec 20 15:27:10 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 9e561148fcb1e7bce6349c4de2dba7bb0b45a8bb
Author: David Capello <davidcapello at gmail.com>
Date: Thu Sep 17 16:40:49 2015 -0300
Minor changes in Timeline::showCel()
Removed some local variables.
---
src/app/ui/timeline.cpp | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/app/ui/timeline.cpp b/src/app/ui/timeline.cpp
index bfe4924..dc9c1db 100644
--- a/src/app/ui/timeline.cpp
+++ b/src/app/ui/timeline.cpp
@@ -2177,23 +2177,21 @@ void Timeline::showCel(LayerIndex layer, frame_t frame)
{
gfx::Point scroll = getViewScroll();
int x1, y1, x2, y2;
- int left = m_viewportArea.x;
- int top = m_viewportArea.y;
- x1 = left + FRMSIZE*frame - scroll.x;
- y1 = top + LAYSIZE*(lastLayer() - layer) - scroll.y;
+ x1 = m_viewportArea.x + FRMSIZE*frame - scroll.x;
+ y1 = m_viewportArea.y + LAYSIZE*(lastLayer() - layer) - scroll.y;
x2 = x1 + FRMSIZE - 1;
y2 = y1 + LAYSIZE - 1;
- if (x1 < left) {
- scroll.x -= left - (x1);
+ if (x1 < m_viewportArea.x) {
+ scroll.x -= m_viewportArea.x - x1;
}
else if (x2 > m_viewportArea.x2()-1) {
scroll.x += (x2) - (m_viewportArea.x2()-1);
}
- if (y1 < top) {
- scroll.y -= top - (y1);
+ if (y1 < m_viewportArea.y) {
+ scroll.y -= m_viewportArea.y - (y1);
}
else if (y2 > m_viewportArea.y2()-1) {
scroll.y += (y2) - (m_viewportArea.y2()-1);
--
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