[gimp] app: in GimpToolTransformGrid, add NONE function



commit 0eae8a47eabf1436b428e17d0c2cc775c824b6d3
Author: Ell <ell_se yahoo com>
Date:   Mon Jan 6 16:30:58 2020 +0200

    app: in GimpToolTransformGrid, add NONE function
    
    In GimpToolTransformGrid, allow setting "inside-function" and
    "outside-function" to a new NONE value, performing no
    transformation when dragging the respective area.

 app/display/display-enums.c         | 2 ++
 app/display/display-enums.h         | 1 +
 app/display/gimptooltransformgrid.c | 3 +++
 3 files changed, 6 insertions(+)
---
diff --git a/app/display/display-enums.c b/app/display/display-enums.c
index 3c00c38b9d..ad109283de 100644
--- a/app/display/display-enums.c
+++ b/app/display/display-enums.c
@@ -394,6 +394,7 @@ gimp_transform_function_get_type (void)
 {
   static const GEnumValue values[] =
   {
+    { GIMP_TRANSFORM_FUNCTION_NONE, "GIMP_TRANSFORM_FUNCTION_NONE", "none" },
     { GIMP_TRANSFORM_FUNCTION_MOVE, "GIMP_TRANSFORM_FUNCTION_MOVE", "move" },
     { GIMP_TRANSFORM_FUNCTION_SCALE, "GIMP_TRANSFORM_FUNCTION_SCALE", "scale" },
     { GIMP_TRANSFORM_FUNCTION_ROTATE, "GIMP_TRANSFORM_FUNCTION_ROTATE", "rotate" },
@@ -404,6 +405,7 @@ gimp_transform_function_get_type (void)
 
   static const GimpEnumDesc descs[] =
   {
+    { GIMP_TRANSFORM_FUNCTION_NONE, "GIMP_TRANSFORM_FUNCTION_NONE", NULL },
     { GIMP_TRANSFORM_FUNCTION_MOVE, "GIMP_TRANSFORM_FUNCTION_MOVE", NULL },
     { GIMP_TRANSFORM_FUNCTION_SCALE, "GIMP_TRANSFORM_FUNCTION_SCALE", NULL },
     { GIMP_TRANSFORM_FUNCTION_ROTATE, "GIMP_TRANSFORM_FUNCTION_ROTATE", NULL },
diff --git a/app/display/display-enums.h b/app/display/display-enums.h
index f7d18df714..72456cb82a 100644
--- a/app/display/display-enums.h
+++ b/app/display/display-enums.h
@@ -177,6 +177,7 @@ GType gimp_transform_function_get_type (void) G_GNUC_CONST;
 
 typedef enum
 {
+  GIMP_TRANSFORM_FUNCTION_NONE,
   GIMP_TRANSFORM_FUNCTION_MOVE,
   GIMP_TRANSFORM_FUNCTION_SCALE,
   GIMP_TRANSFORM_FUNCTION_ROTATE,
diff --git a/app/display/gimptooltransformgrid.c b/app/display/gimptooltransformgrid.c
index eb649222c3..b361401fd5 100644
--- a/app/display/gimptooltransformgrid.c
+++ b/app/display/gimptooltransformgrid.c
@@ -1835,6 +1835,9 @@ gimp_tool_transform_get_area_handle (GimpToolTransformGrid *grid,
 
   switch (function)
     {
+    case GIMP_TRANSFORM_FUNCTION_NONE:
+      break;
+
     case GIMP_TRANSFORM_FUNCTION_MOVE:
       handle = GIMP_TRANSFORM_HANDLE_CENTER;
       break;


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