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.
This commit is contained in:
David Capello 2016-02-01 10:56:03 -03:00
parent 2f791b5ad1
commit b3a95266d7
2 changed files with 7 additions and 1 deletions

View File

@ -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);

View File

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