Bug 776017 - Print resolution changes not taken in account...

... for second printing.
Do not save in parasite the resolution used in the print plug-in when
it is the image intended resolution. This allows to take into account
changes of print resolution in successive printing. Only save it when
different since one may have reasons and we should not interfere.
This commit is contained in:
Jehan
2016-12-14 00:55:58 +01:00
parent 4827116ac9
commit 7335dc8dc2

View File

@ -81,12 +81,20 @@ print_settings_save (PrintData *data)
/* image setup */
if (gimp_image_is_valid (data->image_id))
{
gdouble xres;
gdouble yres;
gimp_image_get_resolution (data->image_id, &xres, &yres);
g_key_file_set_integer (key_file, "image-setup",
"unit", data->unit);
if (xres != data->xres || yres != data->yres)
{
g_key_file_set_double (key_file, "image-setup",
"x-resolution", data->xres);
g_key_file_set_double (key_file, "image-setup",
"y-resolution", data->yres);
}
g_key_file_set_double (key_file, "image-setup",
"x-offset", data->offset_x);
g_key_file_set_double (key_file, "image-setup",