diff --git a/rtdata/languages/default b/rtdata/languages/default index b22b00e52..e1b4399f6 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -728,13 +728,6 @@ HISTORY_MSG_491;White Balance HISTORY_MSG_492;RGB Curves HISTORY_MSG_493;L*a*b* Adjustments HISTORY_MSG_494;Capture Sharpening -HISTORY_MSG_496;Perspective - Camera -HISTORY_MSG_497;Perspective - Camera -HISTORY_MSG_498;Perspective - Recovery -HISTORY_MSG_499;Perspective - PCA - Rotation -HISTORY_MSG_500;Perspective - PCA -HISTORY_MSG_501;Perspective - Camera -HISTORY_MSG_502;Perspective - Method HISTORY_MSG_CAT02PRESET;Cat02 automatic preset HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction @@ -783,6 +776,13 @@ HISTORY_MSG_PDSHARPEN_CONTRAST;CS - Contrast threshold HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost +HISTORY_MSG_PERSP_CAM_ANGLE;Perspective - Camera +HISTORY_MSG_PERSP_CAM_FL;Perspective - Camera +HISTORY_MSG_PERSP_CAM_SHIFT;Perspective - Camera +HISTORY_MSG_PERSP_METHOD;Perspective - Method +HISTORY_MSG_PERSP_PROJ_ANGLE;Perspective - Recovery +HISTORY_MSG_PERSP_PROJ_ROTATE;Perspective - PCA rotation +HISTORY_MSG_PERSP_PROJ_SHIFT;Perspective - PCA HISTORY_MSG_PIXELSHIFT_DEMOSAIC;PS - Demosaic method for motion HISTORY_MSG_PREPROCESS_LINEDENOISE_DIRECTION;Line noise filter direction HISTORY_MSG_PREPROCESS_PDAFLINESFILTER;PDAF lines filter diff --git a/rtengine/procevents.h b/rtengine/procevents.h index bd8b06650..1b00d4218 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -518,13 +518,6 @@ enum ProcEventCode { EvLEnabled = 492, EvPdShrEnabled = 493, EvPdShrMaskToggled = 494, - EvPerspCamFocalLength = 495, - EvPerspCamShift = 496, - EvPerspProjAngle = 497, - EvPerspProjRotate = 498, - EvPerspProjShift = 499, - EvPerspCamAngle = 500, - EvPerspMethod = 501, NUMOFEVENTS diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 29384b652..b77eac29c 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -521,14 +521,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = { RGBCURVE, // EvRGBEnabled LUMINANCECURVE, // EvLEnabled DEMOSAIC, // EvPdShrEnabled - CAPTURESHARPEN, // EvPdShrMaskToggled - TRANSFORM, // EvPerspCamFocalLength - TRANSFORM, // EvPerspCamShift - TRANSFORM, // EvPerspProjAngle - TRANSFORM, // EvPerspProjRotate - TRANSFORM, // EvPerspProjShift - TRANSFORM, // EvPerspCamAngle - TRANSFORM // EvPerspMethod + CAPTURESHARPEN // EvPdShrMaskToggled }; diff --git a/rtgui/perspective.cc b/rtgui/perspective.cc index 42175616f..0607a7604 100644 --- a/rtgui/perspective.cc +++ b/rtgui/perspective.cc @@ -16,6 +16,7 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ +#include "eventmapper.h" #include "perspective.h" #include "rtimage.h" @@ -28,6 +29,14 @@ using namespace rtengine::procparams; PerspCorrection::PerspCorrection () : FoldableToolPanel(this, "perspective", M("TP_PERSPECTIVE_LABEL")) { + auto mapper = ProcEventMapper::getInstance(); + EvPerspCamAngle = mapper->newEvent(TRANSFORM, "HISTORY_MSG_PERSP_CAM_ANGLE"); + EvPerspCamFocalLength = mapper->newEvent(TRANSFORM, "HISTORY_MSG_PERSP_CAM_FL"); + EvPerspCamShift = mapper->newEvent(TRANSFORM, "HISTORY_MSG_PERSP_CAM_SHIFT"); + EvPerspMethod = mapper->newEvent(TRANSFORM, "HISTORY_MSG_PERSP_METHOD"); + EvPerspProjAngle = mapper->newEvent(TRANSFORM, "HISTORY_MSG_PERSP_PROJ_ANGLE"); + EvPerspProjRotate = mapper->newEvent(TRANSFORM, "HISTORY_MSG_PERSP_PROJ_ROTATE"); + EvPerspProjShift = mapper->newEvent(TRANSFORM, "HISTORY_MSG_PERSP_PROJ_SHIFT"); lens_geom_listener = nullptr; Gtk::Image* ipersHL = Gtk::manage (new RTImage ("perspective-horizontal-left-small.png")); diff --git a/rtgui/perspective.h b/rtgui/perspective.h index e09a766de..1be392f7c 100644 --- a/rtgui/perspective.h +++ b/rtgui/perspective.h @@ -51,6 +51,13 @@ protected: Adjuster* projection_shift_horiz; Adjuster* projection_shift_vert; Adjuster* projection_yaw; + rtengine::ProcEvent EvPerspCamFocalLength; + rtengine::ProcEvent EvPerspCamShift; + rtengine::ProcEvent EvPerspCamAngle; + rtengine::ProcEvent EvPerspMethod; + rtengine::ProcEvent EvPerspProjShift; + rtengine::ProcEvent EvPerspProjRotate; + rtengine::ProcEvent EvPerspProjAngle; LensGeomListener* lens_geom_listener; const rtengine::FramesMetaData* metadata;