This is an automated email from the git hooks/post-receive script. thansen pushed a commit to branch master in repository aseprite.
commit 581fbb663226eedbc80621e6940347ac7ff9d26a Author: David Capello <[email protected]> Date: Thu Sep 17 16:39:55 2015 -0300 Fix some scrolling issues in Timeline when clicking in a new cel --- src/app/ui/timeline.cpp | 10 ++++++++++ src/app/ui/timeline.h | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/app/ui/timeline.cpp b/src/app/ui/timeline.cpp index a2d71d1..bfe4924 100644 --- a/src/app/ui/timeline.cpp +++ b/src/app/ui/timeline.cpp @@ -41,6 +41,7 @@ #include "app/util/clipboard.h" #include "base/convert_to.h" #include "base/memory.h" +#include "base/scoped_value.h" #include "doc/doc.h" #include "doc/document_event.h" #include "doc/frame_tag.h" @@ -131,6 +132,7 @@ Timeline::Timeline() , m_clipboard_timer(100, this) , m_offset_count(0) , m_scroll(false) + , m_fromTimeline(false) { m_ctxConn = m_context->AfterCommandExecution.connect( &Timeline::onAfterCommandExecution, this); @@ -360,6 +362,7 @@ bool Timeline::onProcessMessage(Message* msg) break; } case PART_LAYER_TEXT: { + base::ScopedValue<bool> lock(m_fromTimeline, true, false); LayerIndex old_layer = getLayerIndex(m_layer); bool selectLayer = (mouseMsg->left() || !isLayerActive(m_clk.layer)); @@ -387,6 +390,7 @@ bool Timeline::onProcessMessage(Message* msg) case PART_LAYER_CONTINUOUS_ICON: break; case PART_CEL: { + base::ScopedValue<bool> lock(m_fromTimeline, true, false); LayerIndex old_layer = getLayerIndex(m_layer); bool selectCel = (mouseMsg->left() || !isLayerActive(m_clk.layer) @@ -1113,6 +1117,9 @@ void Timeline::onStateChanged(Editor* editor) void Timeline::onAfterFrameChanged(Editor* editor) { + if (m_fromTimeline) + return; + setFrame(editor->frame()); if (!hasCapture()) @@ -1124,6 +1131,9 @@ void Timeline::onAfterFrameChanged(Editor* editor) void Timeline::onAfterLayerChanged(Editor* editor) { + if (m_fromTimeline) + return; + setLayer(editor->layer()); if (!hasCapture()) diff --git a/src/app/ui/timeline.h b/src/app/ui/timeline.h index 537f4cf..afbe840 100644 --- a/src/app/ui/timeline.h +++ b/src/app/ui/timeline.h @@ -84,9 +84,6 @@ namespace app { Layer* getLayer() { return m_layer; } frame_t getFrame() { return m_frame; } - void setLayer(Layer* layer); - void setFrame(frame_t frame); - State getState() const { return m_state; } bool isMovingCel() const; @@ -185,6 +182,8 @@ namespace app { int xpos, ypos; }; + void setLayer(Layer* layer); + void setFrame(frame_t frame); bool allLayersVisible(); bool allLayersInvisible(); bool allLayersLocked(); @@ -287,6 +286,7 @@ namespace app { bool m_scroll; // True if the drag-and-drop operation is a scroll operation. bool m_copy; // True if the drag-and-drop operation is a copy. + bool m_fromTimeline; AniControls m_aniControls; -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

