[gimp] app: fix incorrect order of parameters horizontally and vertically
- From: Jacob Boerema <jboerema src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix incorrect order of parameters horizontally and vertically
- Date: Thu, 2 Jun 2022 17:26:29 +0000 (UTC)
commit b130349935eacad2c115e878f39424743c937b23
Author: Jacob Boerema <jgboerema gmail com>
Date: Thu Jun 2 13:26:05 2022 -0400
app: fix incorrect order of parameters horizontally and vertically
There was one case where horizontally and vertically were mixed up in a
call to gimp_display_shell_scale_image_stops_to_fit.
The more usual order of parameters is first horizontal and then vertical.
So, let's fix the actual functions that have the illogical order
of vertically, horizontally instead of fixing the one call.
This brings it in line with the order in other functions and makes it less
likely we mistakenly mess up the parameters.
Besides that gimp_display_shell_scale_image_stops_to_fit also was not
declared as a local function, so we add that too.
app/display/gimpdisplayshell-scale.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-scale.c b/app/display/gimpdisplayshell-scale.c
index a3875aa437..e7c62e501b 100644
--- a/app/display/gimpdisplayshell-scale.c
+++ b/app/display/gimpdisplayshell-scale.c
@@ -79,8 +79,15 @@ static gboolean gimp_display_shell_scale_image_starts_to_fit
(GimpDisplayShell *shell,
gdouble new_scale,
gdouble current_scale,
- gboolean *vertically,
- gboolean *horizontally);
+ gboolean *horizontally,
+ gboolean *vertically);
+static gboolean gimp_display_shell_scale_image_stops_to_fit
+ (GimpDisplayShell *shell,
+ gdouble new_scale,
+ gdouble current_scale,
+ gboolean *horizontally,
+ gboolean *vertically);
+
static gboolean gimp_display_shell_scale_viewport_coord_almost_centered
(GimpDisplayShell *shell,
gint x,
@@ -1249,8 +1256,8 @@ static gboolean
gimp_display_shell_scale_image_starts_to_fit (GimpDisplayShell *shell,
gdouble new_scale,
gdouble current_scale,
- gboolean *vertically,
- gboolean *horizontally)
+ gboolean *horizontally,
+ gboolean *vertically)
{
gboolean vertically_dummy;
gboolean horizontally_dummy;
@@ -1295,14 +1302,14 @@ static gboolean
gimp_display_shell_scale_image_stops_to_fit (GimpDisplayShell *shell,
gdouble new_scale,
gdouble current_scale,
- gboolean *vertically,
- gboolean *horizontally)
+ gboolean *horizontally,
+ gboolean *vertically)
{
return gimp_display_shell_scale_image_starts_to_fit (shell,
current_scale,
new_scale,
- vertically,
- horizontally);
+ horizontally,
+ vertically);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]