Commit 0a5251c9 authored by Michael Natterer's avatar Michael Natterer 😴

app: simplify gimp_transform_tool_modifier_key()

No need to have n g_object_set() to set n properties, use one call
instead.
parent 0cb3e75f
......@@ -451,35 +451,19 @@ gimp_transform_tool_modifier_key (GimpTool *tool,
if (key == gimp_get_constrain_behavior_mask ())
{
g_object_set (options,
"frompivot-scale", ! options->frompivot_scale,
NULL);
g_object_set (options,
"frompivot-shear", ! options->frompivot_shear,
NULL);
g_object_set (options,
"frompivot-scale", ! options->frompivot_scale,
"frompivot-shear", ! options->frompivot_shear,
"frompivot-perspective", ! options->frompivot_perspective,
NULL);
}
if (key == gimp_get_extend_selection_mask ())
else if (key == gimp_get_extend_selection_mask ())
{
g_object_set (options,
"cornersnap", ! options->cornersnap,
NULL);
g_object_set (options,
"constrain-move", ! options->constrain_move,
NULL);
g_object_set (options,
"constrain-scale", ! options->constrain_scale,
NULL);
g_object_set (options,
"constrain-rotate", ! options->constrain_rotate,
NULL);
g_object_set (options,
"constrain-shear", ! options->constrain_shear,
NULL);
g_object_set (options,
"cornersnap", ! options->cornersnap,
"constrain-move", ! options->constrain_move,
"constrain-scale", ! options->constrain_scale,
"constrain-rotate", ! options->constrain_rotate,
"constrain-shear", ! options->constrain_shear,
"constrain-perspective", ! options->constrain_perspective,
NULL);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment