Bug 730862 - Preview frozen while dragging selection tools...
...(crop, rectangle, etc) in large image zoomed-to-fit Default to GIMP_MOTION_MODE_COMPRESS in all tools, and override it to GIMP_MOTION_MODE_EXACT if the tool really needs the exact path of motion events. This greatly reduces the events processed by the rectangle tools and makes them much more responsive.
This commit is contained in:
@ -119,11 +119,8 @@ gimp_color_picker_tool_class_init (GimpColorPickerToolClass *klass)
|
||||
static void
|
||||
gimp_color_picker_tool_init (GimpColorPickerTool *picker_tool)
|
||||
{
|
||||
GimpTool *tool = GIMP_TOOL (picker_tool);
|
||||
GimpColorTool *color_tool = GIMP_COLOR_TOOL (picker_tool);
|
||||
|
||||
gimp_tool_control_set_motion_mode (tool->control, GIMP_MOTION_MODE_COMPRESS);
|
||||
|
||||
color_tool->pick_mode = GIMP_COLOR_PICK_MODE_FOREGROUND;
|
||||
}
|
||||
|
||||
|
||||
@ -146,10 +146,6 @@ gimp_edit_selection_tool_class_init (GimpEditSelectionToolClass *klass)
|
||||
static void
|
||||
gimp_edit_selection_tool_init (GimpEditSelectionTool *edit_selection_tool)
|
||||
{
|
||||
GimpTool *tool = GIMP_TOOL (edit_selection_tool);
|
||||
|
||||
gimp_tool_control_set_motion_mode (tool->control, GIMP_MOTION_MODE_COMPRESS);
|
||||
|
||||
edit_selection_tool->origx = 0;
|
||||
edit_selection_tool->origy = 0;
|
||||
|
||||
|
||||
@ -226,6 +226,7 @@ gimp_foreground_select_tool_init (GimpForegroundSelectTool *fg_select)
|
||||
{
|
||||
GimpTool *tool = GIMP_TOOL (fg_select);
|
||||
|
||||
gimp_tool_control_set_motion_mode (tool->control, GIMP_MOTION_MODE_EXACT);
|
||||
gimp_tool_control_set_scroll_lock (tool->control, FALSE);
|
||||
gimp_tool_control_set_preserve (tool->control, FALSE);
|
||||
gimp_tool_control_set_dirty_mask (tool->control,
|
||||
|
||||
@ -233,6 +233,7 @@ gimp_free_select_tool_init (GimpFreeSelectTool *fst)
|
||||
GimpTool *tool = GIMP_TOOL (fst);
|
||||
GimpFreeSelectToolPrivate *priv = GET_PRIVATE (fst);
|
||||
|
||||
gimp_tool_control_set_motion_mode (tool->control, GIMP_MOTION_MODE_EXACT);
|
||||
gimp_tool_control_set_wants_click (tool->control, TRUE);
|
||||
gimp_tool_control_set_precision (tool->control,
|
||||
GIMP_CURSOR_PRECISION_SUBPIXEL);
|
||||
|
||||
@ -154,8 +154,6 @@ gimp_move_tool_init (GimpMoveTool *move_tool)
|
||||
{
|
||||
GimpTool *tool = GIMP_TOOL (move_tool);
|
||||
|
||||
gimp_tool_control_set_motion_mode (tool->control,
|
||||
GIMP_MOTION_MODE_COMPRESS);
|
||||
gimp_tool_control_set_snap_to (tool->control, FALSE);
|
||||
gimp_tool_control_set_handle_empty_image (tool->control, TRUE);
|
||||
gimp_tool_control_set_tool_cursor (tool->control,
|
||||
|
||||
@ -103,7 +103,6 @@ gimp_region_select_tool_init (GimpRegionSelectTool *region_select)
|
||||
GimpTool *tool = GIMP_TOOL (region_select);
|
||||
|
||||
gimp_tool_control_set_scroll_lock (tool->control, TRUE);
|
||||
gimp_tool_control_set_motion_mode (tool->control, GIMP_MOTION_MODE_COMPRESS);
|
||||
|
||||
region_select->x = 0;
|
||||
region_select->y = 0;
|
||||
|
||||
@ -221,9 +221,6 @@ gimp_seamless_clone_tool_init (GimpSeamlessCloneTool *self)
|
||||
gimp_tool_control_set_tool_cursor (tool->control,
|
||||
GIMP_TOOL_CURSOR_MOVE);
|
||||
|
||||
gimp_tool_control_set_motion_mode (tool->control,
|
||||
GIMP_MOTION_MODE_COMPRESS);
|
||||
|
||||
self->tool_state = SC_STATE_INIT;
|
||||
}
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@ gimp_tool_control_init (GimpToolControl *control)
|
||||
control->handle_empty_image = FALSE;
|
||||
|
||||
control->dirty_mask = GIMP_DIRTY_NONE;
|
||||
control->motion_mode = GIMP_MOTION_MODE_EXACT;
|
||||
control->motion_mode = GIMP_MOTION_MODE_COMPRESS;
|
||||
|
||||
control->auto_snap_to = TRUE;
|
||||
control->snap_offset_x = 0;
|
||||
|
||||
@ -189,8 +189,6 @@ gimp_vector_tool_init (GimpVectorTool *vector_tool)
|
||||
GimpTool *tool = GIMP_TOOL (vector_tool);
|
||||
|
||||
gimp_tool_control_set_handle_empty_image (tool->control, TRUE);
|
||||
gimp_tool_control_set_motion_mode (tool->control,
|
||||
GIMP_MOTION_MODE_COMPRESS);
|
||||
gimp_tool_control_set_precision (tool->control,
|
||||
GIMP_CURSOR_PRECISION_SUBPIXEL);
|
||||
gimp_tool_control_set_tool_cursor (tool->control,
|
||||
|
||||
Reference in New Issue
Block a user