app/display: Initialize GimpDisplayShell's unit property

Since GimpUnit is now an object, if it's used in functions while
NULL it can cause issues. This patch initializes it to
gimp_unit_pixel () to remove the CRITICALs we received when
setting up rulers when "Show All" is enabled.
This commit is contained in:
Alx Sa 2024-11-09 22:09:20 +00:00
parent 817e19ee38
commit 6ff3e80d0b

View file

@ -344,6 +344,7 @@ gimp_display_shell_init (GimpDisplayShell *shell)
shell->dot_for_dot = TRUE; shell->dot_for_dot = TRUE;
shell->scale_x = 1.0; shell->scale_x = 1.0;
shell->scale_y = 1.0; shell->scale_y = 1.0;
shell->unit = gimp_unit_pixel ();
shell->show_image = TRUE; shell->show_image = TRUE;