[aseprite] 220/308: Don't change MiniPlayButton state in preview window when we scroll it (fix #958)
Tobias Hansen
thansen at moszumanska.debian.org
Tue Mar 8 02:45:13 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 1f319cd2d14b9f0486147c2e46f815e979432956
Author: David Capello <davidcapello at gmail.com>
Date: Thu Feb 11 21:39:22 2016 -0300
Don't change MiniPlayButton state in preview window when we scroll it (fix #958)
---
src/app/ui/preview_editor.cpp | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/src/app/ui/preview_editor.cpp b/src/app/ui/preview_editor.cpp
index 77d71c2..ad32a64 100644
--- a/src/app/ui/preview_editor.cpp
+++ b/src/app/ui/preview_editor.cpp
@@ -21,7 +21,6 @@
#include "app/ui/editor/editor.h"
#include "app/ui/editor/editor_view.h"
#include "app/ui/editor/navigate_state.h"
-#include "app/ui/editor/play_state.h"
#include "app/ui/skin/skin_button.h"
#include "app/ui/skin/skin_theme.h"
#include "app/ui/status_bar.h"
@@ -102,8 +101,8 @@ public:
bool isPlaying() const { return m_isPlaying; }
- void stop() {
- m_isPlaying = false;
+ void setPlaying(bool state) {
+ m_isPlaying = state;
setupIcons();
}
@@ -398,14 +397,9 @@ void PreviewEditorWindow::uncheckCenterButton()
void PreviewEditorWindow::onStateChanged(Editor* editor)
{
- EditorStatePtr state = editor->getState();
- PlayState* playState = (state ? dynamic_cast<PlayState*>(state.get()): nullptr);
- if (!playState) {
- // We have to switch the "play button" state to "play" because the
- // editor animation has just stopped. This happens when we use
- // "play once" option and the PlayState stops automatically.
- m_playButton->stop();
- }
+ // Sync editor playing state with MiniPlayButton state
+ if (m_playButton->isPlaying() != editor->isPlaying())
+ m_playButton->setPlaying(editor->isPlaying());
}
void PreviewEditorWindow::onScrollChanged(Editor* miniEditor)
--
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