[gimp] app: npd-tool: display cursor and cursor modifiers



commit b4ae7c7f61cdd746532fe18bd2eeb5798ac3fdb3
Author: Marek Dvoroznak <dvoromar gmail com>
Date:   Wed Aug 7 19:25:34 2013 +0200

    app: npd-tool: display cursor and cursor modifiers

 app/tools/gimpnpointdeformationtool.c |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/app/tools/gimpnpointdeformationtool.c b/app/tools/gimpnpointdeformationtool.c
index 2b42acf..462c528 100644
--- a/app/tools/gimpnpointdeformationtool.c
+++ b/app/tools/gimpnpointdeformationtool.c
@@ -331,6 +331,17 @@ gimp_n_point_deformation_tool_cursor_update (GimpTool         *tool,
                                              GdkModifierType   state,
                                              GimpDisplay      *display)
 {
+  GimpNPointDeformationTool *npd_tool       = GIMP_N_POINT_DEFORMATION_TOOL (tool);
+  GimpCursorModifier         modifier       = GIMP_CURSOR_MODIFIER_PLUS;
+
+  if (npd_tool->hovering_cp != NULL)
+    {
+        modifier = GIMP_CURSOR_MODIFIER_MOVE;
+    }
+
+  gimp_tool_control_set_cursor_modifier (tool->control, modifier);
+
+  GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, display);
 }
 
 #define gimp_n_point_deformation_tool_clear_selected_points_list()             \
@@ -561,7 +572,7 @@ gimp_n_point_deformation_tool_motion (GimpTool         *tool,
   gdouble                    shift_x      = coords->x - npd_tool->movement_start_x;
   gdouble                    shift_y      = coords->y - npd_tool->movement_start_y;
 
-  gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));
+  gimp_draw_tool_pause (draw_tool);
 
   if (selected_cp != NULL)
     {
@@ -582,5 +593,5 @@ gimp_n_point_deformation_tool_motion (GimpTool         *tool,
   npd_tool->cursor_x = coords->x;
   npd_tool->cursor_y = coords->y;
 
-  gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));
+  gimp_draw_tool_resume (draw_tool);
 }


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