[aseprite] 238/308: Fix bug restoring frame duration after undoing a "remove frame" (fix #965)
Tobias Hansen
thansen at moszumanska.debian.org
Tue Mar 8 02:45:15 UTC 2016
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository aseprite.
commit dbb8a17d470bedb8d60a1b1e4f25f95af8d453a8
Author: David Capello <davidcapello at gmail.com>
Date: Mon Feb 15 17:13:23 2016 -0300
Fix bug restoring frame duration after undoing a "remove frame" (fix #965)
---
src/app/cmd/remove_frame.cpp | 4 +++-
src/app/cmd/remove_frame.h | 3 ++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/app/cmd/remove_frame.cpp b/src/app/cmd/remove_frame.cpp
index 17198d8..04d3ddb 100644
--- a/src/app/cmd/remove_frame.cpp
+++ b/src/app/cmd/remove_frame.cpp
@@ -1,5 +1,5 @@
// Aseprite
-// Copyright (C) 2001-2015 David Capello
+// Copyright (C) 2001-2016 David Capello
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@@ -27,6 +27,7 @@ RemoveFrame::RemoveFrame(Sprite* sprite, frame_t frame)
, m_frame(frame)
, m_firstTime(true)
{
+ m_frameDuration = sprite->frameDuration(frame);
for (Cel* cel : sprite->cels(m_frame))
m_seq.add(new cmd::RemoveCel(cel));
}
@@ -59,6 +60,7 @@ void RemoveFrame::onUndo()
Document* doc = sprite->document();
sprite->addFrame(m_frame);
+ sprite->setFrameDuration(m_frame, m_frameDuration);
sprite->incrementVersion();
m_seq.undo();
diff --git a/src/app/cmd/remove_frame.h b/src/app/cmd/remove_frame.h
index 2f31e71..6b07744 100644
--- a/src/app/cmd/remove_frame.h
+++ b/src/app/cmd/remove_frame.h
@@ -1,5 +1,5 @@
// Aseprite
-// Copyright (C) 2001-2015 David Capello
+// Copyright (C) 2001-2016 David Capello
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@@ -32,6 +32,7 @@ namespace cmd {
private:
frame_t m_frame;
+ int m_frameDuration;
CmdSequence m_seq;
bool m_firstTime;
};
--
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