[aseprite] 142/308: Redraw Timeline when layer/cel user color is changed
Tobias Hansen
thansen at moszumanska.debian.org
Tue Mar 8 02:45:03 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 4c58441823009773d804864bbbc8574d58935330
Author: David Capello <davidcapello at gmail.com>
Date: Tue Dec 22 13:18:08 2015 -0300
Redraw Timeline when layer/cel user color is changed
---
src/app/commands/cmd_cel_properties.cpp | 14 ++++++++++++--
src/app/commands/cmd_layer_properties.cpp | 9 ++++++++-
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/src/app/commands/cmd_cel_properties.cpp b/src/app/commands/cmd_cel_properties.cpp
index 5c2fd72..b471415 100644
--- a/src/app/commands/cmd_cel_properties.cpp
+++ b/src/app/commands/cmd_cel_properties.cpp
@@ -167,8 +167,13 @@ private:
if (newOpacity != m_cel->opacity())
transaction.execute(new cmd::SetCelOpacity(writer.cel(), newOpacity));
- if (m_userData != m_cel->data()->userData())
+ if (m_userData != m_cel->data()->userData()) {
transaction.execute(new cmd::SetUserData(writer.cel()->data(), m_userData));
+
+ // Redraw timeline because the cel's user data/color
+ // might have changed.
+ App::instance()->getMainWindow()->getTimeline()->invalidate();
+ }
}
else {
for (Cel* cel : m_document->sprite()->uniqueCels()) {
@@ -178,8 +183,13 @@ private:
transaction.execute(new cmd::SetCelOpacity(cel, newOpacity));
}
- if (m_userData != cel->data()->userData())
+ if (m_userData != cel->data()->userData()) {
transaction.execute(new cmd::SetUserData(cel->data(), m_userData));
+
+ // Redraw timeline because the cel's user data/color
+ // might have changed.
+ App::instance()->getMainWindow()->getTimeline()->invalidate();
+ }
}
}
diff --git a/src/app/commands/cmd_layer_properties.cpp b/src/app/commands/cmd_layer_properties.cpp
index 5442ca9..ac8c18d 100644
--- a/src/app/commands/cmd_layer_properties.cpp
+++ b/src/app/commands/cmd_layer_properties.cpp
@@ -19,6 +19,8 @@
#include "app/context_access.h"
#include "app/modules/gui.h"
#include "app/transaction.h"
+#include "app/ui/main_window.h"
+#include "app/ui/timeline.h"
#include "app/ui/user_data_popup.h"
#include "app/ui_context.h"
#include "base/bind.h"
@@ -193,9 +195,14 @@ private:
if (newBlendMode != m_layer->blendMode())
transaction.execute(new cmd::SetLayerBlendMode(static_cast<LayerImage*>(writer.layer()), newBlendMode));
- if (m_userData != m_layer->userData())
+ if (m_userData != m_layer->userData()) {
transaction.execute(new cmd::SetUserData(writer.layer(), m_userData));
+ // Redraw timeline because the layer's user data/color
+ // might have changed.
+ App::instance()->getMainWindow()->getTimeline()->invalidate();
+ }
+
transaction.commit();
}
catch (const std::exception& e) {
--
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