[gimp/gimp-2-10] app: make unattached vectors enable to rotate.



commit 7727c6f57c9a0d7450aa3ade1d291bb0019c7995
Author: ONO Yoshio <ohtsuka yoshio gmail com>
Date:   Mon Sep 3 12:19:59 2018 +0900

    app: make unattached vectors enable to rotate.
    
    (cherry picked from commit 2d415f53bf582b9cfabe049fd3d95a274b3e39e9)

 app/core/gimpitem.c       | 1 -
 app/vectors/gimpvectors.c | 7 ++++---
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/app/core/gimpitem.c b/app/core/gimpitem.c
index 363ee52eec..688daebeea 100644
--- a/app/core/gimpitem.c
+++ b/app/core/gimpitem.c
@@ -1663,7 +1663,6 @@ gimp_item_rotate (GimpItem         *item,
   gboolean       push_undo;
 
   g_return_if_fail (GIMP_IS_ITEM (item));
-  g_return_if_fail (gimp_item_is_attached (item));
   g_return_if_fail (GIMP_IS_CONTEXT (context));
 
   item_class = GIMP_ITEM_GET_CLASS (item);
diff --git a/app/vectors/gimpvectors.c b/app/vectors/gimpvectors.c
index e9fe9d25ae..458d102114 100644
--- a/app/vectors/gimpvectors.c
+++ b/app/vectors/gimpvectors.c
@@ -582,9 +582,10 @@ gimp_vectors_rotate (GimpItem         *item,
 
   gimp_vectors_freeze (vectors);
 
-  gimp_image_undo_push_vectors_mod (gimp_item_get_image (item),
-                                    _("Rotate Path"),
-                                    vectors);
+  if (gimp_item_is_attached (item))
+    gimp_image_undo_push_vectors_mod (gimp_item_get_image (item),
+                                      _("Rotate Path"),
+                                      vectors);
 
   for (list = vectors->strokes->head; list; list = g_list_next (list))
     {


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