app: fix switching filter-tool split-preview orientation
... after last commit.
(cherry picked from commit 93f728e484
)
This commit is contained in:
@ -234,11 +234,11 @@ gimp_filter_options_switch_preview_side (GimpFilterOptions *options)
|
|||||||
|
|
||||||
void
|
void
|
||||||
gimp_filter_options_switch_preview_orientation (GimpFilterOptions *options,
|
gimp_filter_options_switch_preview_orientation (GimpFilterOptions *options,
|
||||||
gdouble position_x,
|
gint position_x,
|
||||||
gdouble position_y)
|
gint position_y)
|
||||||
{
|
{
|
||||||
GimpAlignmentType alignment;
|
GimpAlignmentType alignment;
|
||||||
gdouble position;
|
gint position;
|
||||||
|
|
||||||
g_return_if_fail (GIMP_IS_FILTER_OPTIONS (options));
|
g_return_if_fail (GIMP_IS_FILTER_OPTIONS (options));
|
||||||
|
|
||||||
@ -264,6 +264,6 @@ gimp_filter_options_switch_preview_orientation (GimpFilterOptions *options,
|
|||||||
|
|
||||||
g_object_set (options,
|
g_object_set (options,
|
||||||
"preview-split-alignment", alignment,
|
"preview-split-alignment", alignment,
|
||||||
"preview-split-position", CLAMP (position, 0.0, 1.0),
|
"preview-split-position", position,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
@ -56,8 +56,8 @@ GType gimp_filter_options_get_type (void) G_GNUC_CONST;
|
|||||||
|
|
||||||
void gimp_filter_options_switch_preview_side (GimpFilterOptions *options);
|
void gimp_filter_options_switch_preview_side (GimpFilterOptions *options);
|
||||||
void gimp_filter_options_switch_preview_orientation (GimpFilterOptions *options,
|
void gimp_filter_options_switch_preview_orientation (GimpFilterOptions *options,
|
||||||
gdouble position_x,
|
gint position_x,
|
||||||
gdouble position_y);
|
gint position_y);
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GIMP_FILTER_OPTIONS_H__ */
|
#endif /* __GIMP_FILTER_OPTIONS_H__ */
|
||||||
|
@ -490,13 +490,13 @@ gimp_filter_tool_button_press (GimpTool *tool,
|
|||||||
else if (state & gimp_get_toggle_behavior_mask ())
|
else if (state & gimp_get_toggle_behavior_mask ())
|
||||||
{
|
{
|
||||||
GimpItem *item = GIMP_ITEM (tool->drawable);
|
GimpItem *item = GIMP_ITEM (tool->drawable);
|
||||||
gdouble pos_x;
|
gint pos_x;
|
||||||
gdouble pos_y;
|
gint pos_y;
|
||||||
|
|
||||||
pos_x = ((coords->x - gimp_item_get_offset_x (item)) /
|
pos_x = CLAMP (RINT (coords->x) - gimp_item_get_offset_x (item),
|
||||||
gimp_item_get_width (item));
|
0, gimp_item_get_width (item));
|
||||||
pos_y = ((coords->y - gimp_item_get_offset_y (item)) /
|
pos_y = CLAMP (RINT (coords->y) - gimp_item_get_offset_y (item),
|
||||||
gimp_item_get_height (item));
|
0, gimp_item_get_height (item));
|
||||||
|
|
||||||
gimp_filter_options_switch_preview_orientation (options,
|
gimp_filter_options_switch_preview_orientation (options,
|
||||||
pos_x, pos_y);
|
pos_x, pos_y);
|
||||||
|
Reference in New Issue
Block a user