[aseprite] 195/308: Invalidate/redraw timeline in a general document update

Tobias Hansen thansen at moszumanska.debian.org
Tue Mar 8 02:45:10 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 b3a95266d7b8300172928f08776309a0699cb1fb
Author: David Capello <davidcapello at gmail.com>
Date:   Mon Feb 1 10:56:03 2016 -0300

    Invalidate/redraw timeline in a general document update
    
    This is needed if we change the user data color for some cels and we're
    navigating the Undo History to undo/redo those changes. In this way we
    see how the user data is updated in the Timeline.
---
 src/app/ui/timeline.cpp | 5 +++++
 src/app/ui/timeline.h   | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/app/ui/timeline.cpp b/src/app/ui/timeline.cpp
index 30d266f..e48b1e9 100644
--- a/src/app/ui/timeline.cpp
+++ b/src/app/ui/timeline.cpp
@@ -1029,6 +1029,11 @@ void Timeline::onRemoveDocument(doc::Document* document)
     detachDocument();
 }
 
+void Timeline::onGeneralUpdate(DocumentEvent& ev)
+{
+  invalidate();
+}
+
 void Timeline::onAddLayer(doc::DocumentEvent& ev)
 {
   ASSERT(ev.layer() != NULL);
diff --git a/src/app/ui/timeline.h b/src/app/ui/timeline.h
index 1aaaa27..042b8a1 100644
--- a/src/app/ui/timeline.h
+++ b/src/app/ui/timeline.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
@@ -110,6 +110,7 @@ namespace app {
     void onPaint(ui::PaintEvent& ev) override;
 
     // DocumentObserver impl.
+    void onGeneralUpdate(DocumentEvent& ev) override;
     void onAddLayer(doc::DocumentEvent& ev) override;
     void onAfterRemoveLayer(doc::DocumentEvent& ev) override;
     void onAddFrame(doc::DocumentEvent& ev) override;

-- 
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