[gimp/soc-2013-n-point-deformation-tool: 5/23] app: npd-tool: display cursor and cursor modifiers
- From: Marek Dvoroznak <dvoromar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2013-n-point-deformation-tool: 5/23] app: npd-tool: display cursor and cursor modifiers
- Date: Mon, 2 Dec 2013 23:58:59 +0000 (UTC)
commit 66e7726fde8b0179f75e873d17924dad3b2125ed
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]