[gimp/wip/animation: 181/197] plug-ins: animatic not properly re-rendered at panel duration changes.



commit 9af5152811acc9b8b1060c4a94de7ec8058376ad
Author: Jehan <jehan girinstud io>
Date:   Sat Jul 22 17:04:46 2017 +0200

    plug-ins: animatic not properly re-rendered at panel duration changes.

 plug-ins/animation-play/core/animation-animatic.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/animation-play/core/animation-animatic.c 
b/plug-ins/animation-play/core/animation-animatic.c
index d21d9a2..8865a51 100644
--- a/plug-ins/animation-play/core/animation-animatic.c
+++ b/plug-ins/animation-play/core/animation-animatic.c
@@ -215,11 +215,15 @@ animation_animatic_set_panel_duration (AnimationAnimatic *animatic,
   AnimationAnimaticPrivate *priv           = GET_PRIVATE (animatic);
   Animation                *animation      = ANIMATION (animatic);
   gint                      duration;
+  gint                      first_changed_frame;
 
   g_return_if_fail (panel_duration >= 0  &&
                     panel_num >= 0 &&
                     panel_num < priv->n_panels);
 
+  first_changed_frame = animation_animatic_get_position (animatic,
+                                                         panel_num) +
+                        MIN (priv->durations[panel_num], panel_num);
   priv->durations[panel_num] = panel_duration;
   duration = animation_get_duration (animation);
 
@@ -227,6 +231,9 @@ animation_animatic_set_panel_duration (AnimationAnimatic *animatic,
                  panel_num, panel_duration);
   g_signal_emit_by_name (animation, "duration-changed",
                          duration);
+  g_signal_emit_by_name (animation, "frames-changed",
+                         first_changed_frame,
+                         animation_get_duration (animation) - first_changed_frame);
 }
 
 gint


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]