mirror of https://github.com/GNOME/gimp.git
app: rmove gimp_free_select_tool_update_button_state()
and priv->button1_down. Use gimp_tool_control_is_active() instead because it now has exactly that meaning.
This commit is contained in:
parent
7a6bf9b5fe
commit
efbbe39734
|
@ -65,9 +65,6 @@ typedef struct
|
|||
/* Index of grabbed segment index. */
|
||||
gint grabbed_segment_index;
|
||||
|
||||
/* Wether or not button 1 is down. */
|
||||
gboolean button1_down;
|
||||
|
||||
/* We need to keep track of a number of points when we move a
|
||||
* segment vertex
|
||||
*/
|
||||
|
@ -244,8 +241,6 @@ gimp_free_select_tool_init (GimpFreeSelectTool *fst)
|
|||
|
||||
priv->grabbed_segment_index = INVALID_INDEX;
|
||||
|
||||
priv->button1_down = FALSE;
|
||||
|
||||
priv->saved_points_lower_segment = NULL;
|
||||
priv->saved_points_higher_segment = NULL;
|
||||
priv->max_n_saved_points_lower_segment = 0;
|
||||
|
@ -447,15 +442,6 @@ gimp_free_select_tool_revert_to_last_segment (GimpFreeSelectTool *fst)
|
|||
priv->n_points = priv->segment_indices[priv->n_segment_indices - 1] + 1;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_free_select_tool_update_button_state (GimpFreeSelectTool *fst,
|
||||
GdkModifierType state)
|
||||
{
|
||||
GimpFreeSelectToolPrivate *priv = GET_PRIVATE (fst);
|
||||
|
||||
priv->button1_down = state & GDK_BUTTON1_MASK ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_free_select_tool_remove_last_segment (GimpFreeSelectTool *fst)
|
||||
{
|
||||
|
@ -1288,8 +1274,6 @@ gimp_free_select_tool_button_press (GimpTool *tool,
|
|||
|
||||
gimp_draw_tool_pause (draw_tool);
|
||||
|
||||
gimp_free_select_tool_update_button_state (fst, state);
|
||||
|
||||
if (display != tool->display)
|
||||
{
|
||||
gimp_free_select_tool_start (fst,
|
||||
|
@ -1349,8 +1333,6 @@ gimp_free_select_tool_button_release (GimpTool *tool,
|
|||
|
||||
gimp_draw_tool_pause (GIMP_DRAW_TOOL (fst));
|
||||
|
||||
gimp_free_select_tool_update_button_state (fst, state);
|
||||
|
||||
switch (release_type)
|
||||
{
|
||||
case GIMP_BUTTON_RELEASE_CLICK:
|
||||
|
@ -1543,7 +1525,7 @@ gimp_free_select_tool_draw (GimpDrawTool *draw_tool)
|
|||
* feedback for
|
||||
*/
|
||||
handles_wants_to_show = (hovering_first_point ||
|
||||
! priv->button1_down);
|
||||
! gimp_tool_control_is_active (tool->control));
|
||||
|
||||
if (handles_wants_to_show &&
|
||||
! priv->supress_handles)
|
||||
|
@ -1555,7 +1537,7 @@ gimp_free_select_tool_draw (GimpDrawTool *draw_tool)
|
|||
* only draw the first handle, the other handles are not
|
||||
* relevant (see comment a few lines up)
|
||||
*/
|
||||
if (priv->button1_down && hovering_first_point)
|
||||
if (gimp_tool_control_is_active (tool->control) && hovering_first_point)
|
||||
n = MIN (priv->n_segment_indices, 1);
|
||||
else
|
||||
n = priv->n_segment_indices;
|
||||
|
|
Loading…
Reference in New Issue