mirror of https://github.com/GNOME/gimp.git
Active the tool control earlier. (gimp_rectangle_tool_synthesize_motion):
2008-05-10 Martin Nordholts <martinn@svn.gnome.org> * app/tools/gimprectangletool.c (gimp_rectangle_tool_button_press): Active the tool control earlier. (gimp_rectangle_tool_synthesize_motion): Bail out if the tool control is active, we don't want to synthesize a motion in this case as it emits unwanted rectangle-changed signals. svn path=/trunk/; revision=25630
This commit is contained in:
parent
fb904ad1cb
commit
d933812406
|
@ -1,3 +1,12 @@
|
|||
2008-05-10 Martin Nordholts <martinn@svn.gnome.org>
|
||||
|
||||
* app/tools/gimprectangletool.c
|
||||
(gimp_rectangle_tool_button_press): Active the tool control
|
||||
earlier.
|
||||
(gimp_rectangle_tool_synthesize_motion): Bail out if the tool
|
||||
control is active, we don't want to synthesize a motion in this
|
||||
case as it emits unwanted rectangle-changed signals.
|
||||
|
||||
2008-05-10 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/widgets/gimpdialogfactory.[ch]: add signals "dock-added" and
|
||||
|
|
|
@ -841,6 +841,8 @@ gimp_rectangle_tool_button_press (GimpTool *tool,
|
|||
|
||||
gimp_draw_tool_pause (draw_tool);
|
||||
|
||||
gimp_tool_control_activate (tool->control);
|
||||
|
||||
if (display != tool->display)
|
||||
{
|
||||
if (gimp_draw_tool_is_active (draw_tool))
|
||||
|
@ -929,8 +931,6 @@ gimp_rectangle_tool_button_press (GimpTool *tool,
|
|||
|
||||
gimp_rectangle_tool_update_highlight (rect_tool);
|
||||
|
||||
gimp_tool_control_activate (tool->control);
|
||||
|
||||
gimp_draw_tool_resume (draw_tool);
|
||||
}
|
||||
|
||||
|
@ -2159,6 +2159,17 @@ gimp_rectangle_tool_synthesize_motion (GimpRectangleTool *rect_tool,
|
|||
GimpRectangleToolPrivate *private;
|
||||
GimpRectangleFunction old_function;
|
||||
|
||||
/* We don't want to synthesize motions if the tool control is active
|
||||
* since that means the mouse button is down and the rectangle will
|
||||
* get updated in _motion anyway. The reason we want to prevent this
|
||||
* function from executing is that is emits the rectangle-changed
|
||||
* signal which we don't want in the middle of a rectangle change.
|
||||
*/
|
||||
if (gimp_tool_control_is_active (GIMP_TOOL (rect_tool)->control))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
private = GIMP_RECTANGLE_TOOL_GET_PRIVATE (rect_tool);
|
||||
|
||||
old_function = private->function;
|
||||
|
|
Loading…
Reference in New Issue