Fix focal len autofill after browser adjustments

Don't update the camera-based perspective focal length and crop factor
parameters when making other adjustments using the file browser or batch
editor.

Closes #6402
This commit is contained in:
Lawrence Lee
2022-01-08 12:02:25 -08:00
parent 690fab3d08
commit 9c5ce0d9bb
3 changed files with 70 additions and 18 deletions

View File

@@ -949,11 +949,22 @@ struct LensProfParams {
* Parameters of the perspective correction
*/
struct PerspectiveParams {
static constexpr double DEFAULT_CAMERA_CROP_FACTOR = 1;
static constexpr double DEFAULT_CAMERA_FOCAL_LENGTH = 24;
Glib::ustring method;
bool render;
double horizontal;
double vertical;
/**
* Negative and zero values indicate an unspecified crop factor and should
* be interpreted with {@link #DEFAULT_CAMERA_CROP_FACTOR}.
*/
double camera_crop_factor;
/**
* Negative and zero values indicate an unspecified focal length and should
* be interpreted with {@link #DEFAULT_CAMERA_FOCAL_LENGTH}.
*/
double camera_focal_length;
double camera_pitch;
double camera_roll;