From b3a95266d7b8300172928f08776309a0699cb1fb Mon Sep 17 00:00:00 2001 From: David Capello Date: Mon, 1 Feb 2016 10:56:03 -0300 Subject: [PATCH] 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 30d266fc3..e48b1e9a6 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 1aaaa273c..042b8a156 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;