diff --git a/rtdata/themes/TooWaBlue-GTK3-20_.css b/rtdata/themes/TooWaBlue-GTK3-20_.css index ba25e70b7..4d7504dc5 100644 --- a/rtdata/themes/TooWaBlue-GTK3-20_.css +++ b/rtdata/themes/TooWaBlue-GTK3-20_.css @@ -946,7 +946,7 @@ dialog notebook stack { } -/* Adds a line on top of the notebook as a separtor for the titlebar (only on CSD) */ +/* Adds a line on top of the notebook as a separator for the titlebar (only on CSD) */ dialog.csd #PrefNotebook > header, dialog.csd #AboutNotebook > header, window.csd:not(.fullscreen) #MainNotebook > header.top { diff --git a/rtdata/themes/size - Legacy.css b/rtdata/themes/size - Legacy.css index 089a909ee..290b95d8c 100644 --- a/rtdata/themes/size - Legacy.css +++ b/rtdata/themes/size - Legacy.css @@ -102,7 +102,7 @@ notebook > header.left > tabs > arrow { } -/* Adds a line on top of the notebook as a separtor for the titlebar (only on CSD) */ +/* Adds a line on top of the notebook as a separator for the titlebar (only on CSD) */ dialog.csd #PrefNotebook > header, dialog.csd #AboutNotebook > header, window.csd:not(.fullscreen) #MainNotebook > header.top { diff --git a/rtdata/themes/size.css b/rtdata/themes/size.css index 675ed51c2..5f5e64120 100644 --- a/rtdata/themes/size.css +++ b/rtdata/themes/size.css @@ -102,7 +102,7 @@ notebook > header.left > tabs > arrow { } -/* Adds a line on top of the notebook as a separtor for the titlebar (only on CSD) */ +/* Adds a line on top of the notebook as a separator for the titlebar (only on CSD) */ dialog.csd #PrefNotebook > header, dialog.csd #AboutNotebook > header, window.csd:not(.fullscreen) #MainNotebook > header.top { diff --git a/rtengine/cJSON.c b/rtengine/cJSON.c index 130c8e2a5..5af587eeb 100644 --- a/rtengine/cJSON.c +++ b/rtengine/cJSON.c @@ -126,7 +126,7 @@ typedef struct internal_hooks } internal_hooks; #if defined(_MSC_VER) -/* work around MSVC error C2322: '...' address of dillimport '...' is not static */ +/* work around MSVC error C2322: '...' address of dllimport '...' is not static */ static void *internal_malloc(size_t size) { return malloc(size); diff --git a/rtengine/calc_distort.cc b/rtengine/calc_distort.cc index 3a7a4a1c4..8f241d0c5 100644 --- a/rtengine/calc_distort.cc +++ b/rtengine/calc_distort.cc @@ -84,7 +84,7 @@ int calcDistortion(unsigned char* img1, unsigned char* img2, int ncols, int nrow r0[n] = sqrt((x0 - wc) * (x0 - wc) + (y0 - hc) * (y0 - hc)) / radius; - // dots too close to the center tends to have big diviation and create noise, extract them + // dots too close to the center tends to have big deviation and create noise, extract them if (r0[n] < CENTER_R) { continue; } diff --git a/rtengine/camconst.json b/rtengine/camconst.json index c4bf9b14a..a7e589416 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -1230,7 +1230,7 @@ Camera constants: "raw_crop": [ 160, 120, 6024, 4024 ] }, - { // Quality C + { // Quality A "make_model": "Canon EOS R5", "dcraw_matrix" : [9766, -2953, -1254, -4276, 12116, 2433, -437, 1336, 5131], "raw_crop" : [ @@ -1241,7 +1241,7 @@ Camera constants: { "frame" : [ 8352, 5586 ], "areas": [ 94, 20, 5578, 122 ] }, { "frame" : [ 5248, 3510 ], "areas": [ 94, 20, 3510, 122 ] } ], - "ranges" : { "white" : 16382 } + "ranges" : { "white" : 16300 } // 16382 without LENR, add margin for LENR. Dual-pixel frame 2 is lower for low ISOs. }, { // Quality C diff --git a/rtengine/color.cc b/rtengine/color.cc index 085fd41ce..4e139a868 100644 --- a/rtengine/color.cc +++ b/rtengine/color.cc @@ -2895,7 +2895,7 @@ void Color::SkinSat (float lum, float hue, float chrom, float &satreduc) * * data (Munsell ==> Lab) obtained with WallKillcolor and http://www.cis.rit.edu/research/mcsl2/online/munsell.php * each LUT give Hue in function of C, for each color Munsell and Luminance - * eg: _6PB20 : color Munsell 6PB for L=20 c=5 c=45 c=85 c=125..139 when possible: interpolation betwwen values + * eg: _6PB20 : color Munsell 6PB for L=20 c=5 c=45 c=85 c=125..139 when possible: interpolation between values * no value for C<5 (gray) * low memory footprint -- maximum: 195 LUTf * 140 values * errors due to small number of samples in LUT and linearization are very low (1 to 2%) diff --git a/rtengine/iimage.h b/rtengine/iimage.h index cdb7dd6eb..68f739f1a 100644 --- a/rtengine/iimage.h +++ b/rtengine/iimage.h @@ -1858,7 +1858,7 @@ class IImage : virtual public ImageDimensions public: virtual ~IImage() {} - /** @brief Returns a mutex that can is useful in many situations. No image operations shuold be performed without locking this mutex. + /** @brief Returns a mutex that can is useful in many situations. No image operations should be performed without locking this mutex. * @return The mutex */ virtual MyMutex& getMutex () = 0; virtual cmsHPROFILE getProfile () const = 0; diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 3a3529131..6e3ebc48c 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -1889,7 +1889,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) if (params->colorappearance.enabled) { // L histo and Chroma histo for ciecam - // histogram well be for Lab (Lch) values, because very difficult to do with J,Q, M, s, C + // histogram will be for Lab (Lch) values, because very difficult to do with J,Q, M, s, C int x1, y1, x2, y2; params->crop.mapToResized(pW, pH, scale, x1, x2, y1, y2); lhist16CAM.clear(); @@ -1936,7 +1936,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) adap = pow(2.0, E_V - 3.0); // cd / m2 // end calculation adaptation scene luminosity } - if(params->colorappearance.catmethod == "symg") {//force abolute luminance scenescene to 400 in symmetric + if(params->colorappearance.catmethod == "symg") {//force absolute luminance scene to 400 in symmetric adap = 400.; } float d, dj, yb; diff --git a/rtengine/ipwavelet.cc b/rtengine/ipwavelet.cc index 18ee72b80..e5e90a77f 100644 --- a/rtengine/ipwavelet.cc +++ b/rtengine/ipwavelet.cc @@ -2270,7 +2270,7 @@ void ImProcFunctions::Aver(const float* RESTRICT DataList, int datalen, float &a int countP = 0, countN = 0; double averaP = 0.0, averaN = 0.0; // use double precision for large summations - constexpr float thres = 32.7f;//different fom zero to take into account only data large enough 32.7 = 0.1 in range 0..100 very low value + constexpr float thres = 32.7f;//different from zero to take into account only data large enough 32.7 = 0.1 in range 0..100 very low value max = 0.f; min = RT_INFINITY_F; #ifdef _OPENMP @@ -2322,7 +2322,7 @@ void ImProcFunctions::Sigma(const float* RESTRICT DataList, int datalen, float a { int countP = 0, countN = 0; double variP = 0.0, variN = 0.0; // use double precision for large summations - float thres = 32.7f;//different fom zero to take into account only data large enough 32.7 = 0.1 in range 0..100 + float thres = 32.7f;//different from zero to take into account only data large enough 32.7 = 0.1 in range 0..100 #ifdef _OPENMP #pragma omp parallel for reduction(+:variP,variN,countP,countN) num_threads(numThreads) if (numThreads>1) diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 06aa701e8..a1ace9ffa 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -847,7 +847,7 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima const bool doClip = (chmax[0] >= clmax[0] || chmax[1] >= clmax[1] || chmax[2] >= clmax[2]) && !hrp.hrenabled && hrp.clampOOG; bool doHr = (hrp.hrenabled && !iscolor); if (hrp.hrenabled && iscolor) { - if(hrp.method == "Coloropp" && opposed == 1) {//force Inpaint opposed if WB change, and opposed limited tne number to 1 + if(hrp.method == "Coloropp" && opposed == 1) {//force Inpaint opposed if WB change, and opposed limited the number to 1 rgbSourceModified = false; } if (!rgbSourceModified) { @@ -5526,7 +5526,7 @@ void RawImageSource::ItcWB(bool extra, double &tempref, double &greenref, double float gmm[N_t]; float bmm[N_t]; - int siza = 237; //192 untill 01/2023 size of histogram + int siza = 237; //192 until 01/2023 size of histogram if(wbpar.itcwb_sampling == true) { siza = 192;//old sampling 5.9 and before... } @@ -5671,11 +5671,11 @@ void RawImageSource::ItcWB(bool extra, double &tempref, double &greenref, double purp = false; } if(wbpar.itcwb_sampling == false) { - //printf("Use high smapling\n"); + //printf("Use high sampling\n"); histoxyY(bfhitc, bfwitc, xc, yc, Yc, xxx, yyy, YYY, histxy, purp);//purp enable, enable purple color in WB //return histogram x and y for each temp and in a range of 235 colors (siza) } else { - //printf("Use low smapling - 5.9\n"); + //printf("Use low sampling - 5.9\n"); histoxyY_low(bfhitc, bfwitc, xc, yc, Yc, xxx, yyy, YYY, histxy);//low scaling } } @@ -5818,7 +5818,7 @@ void RawImageSource::ItcWB(bool extra, double &tempref, double &greenref, double // int maxnb = rtengine::LIM(settings->itcwb_sizereference, 1, 5); // int maxnb = rtengine::LIM(wbpar.itcwb_size, 1, 5); int maxnb = 3; - //wbpar.itcwb_size to verify if this setting is usefull...diificulties with High gamut and limited patch spectral colors. + //wbpar.itcwb_size to verify if this setting is useful...diificulties with High gamut and limited patch spectral colors. if (wbpar.itcwb_thres > 55) {//normally never used maxnb = 201 / wbpar.itcwb_thres; diff --git a/rtgui/options.h b/rtgui/options.h index 78059357e..db44a5876 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -327,7 +327,7 @@ public: bool internalThumbIfUntouched; bool overwriteOutputFile; int complexity; - bool inspectorWindow; // open inspector in spearate window + bool inspectorWindow; // open inspector in separate window bool zoomOnScroll; // translate scroll events to zoom std::vector thumbnailZoomRatios; diff --git a/rtgui/profilepanel.cc b/rtgui/profilepanel.cc index 8ce9055d0..1acf23649 100644 --- a/rtgui/profilepanel.cc +++ b/rtgui/profilepanel.cc @@ -288,6 +288,12 @@ void ProfilePanel::save_clicked (GdkEventButton* event) toSave = entry ? ProfileStore::getInstance()->getProfile(entry) : nullptr; } + // If no entry has been selected or anything unpredictable happened, toSave + // can be nullptr. + if (toSave == nullptr) { + return; + } + // If it's a partial profile, it's more intuitive to first allow the user // to choose which parameters to save before showing the Save As dialog // #5491 @@ -336,50 +342,70 @@ void ProfilePanel::save_clicked (GdkEventButton* event) filter_any->add_pattern("*"); dialog.add_filter(filter_any); - bool done = true; + while (true) { - do { - if (dialog.run() == Gtk::RESPONSE_OK) { + // Run the saving dialog and let the user select a path and filename. + const auto response = dialog.run(); - std::string fname = dialog.get_filename(); + if (response != Gtk::RESPONSE_OK) { + // Just exit the loop, cause the user cancels the dialog. + + break; + } else { + // Go on with saving the the profile. + + auto fname = dialog.get_filename(); if (("." + getExtension(fname)) != paramFileExtension) { fname += paramFileExtension; } if (!confirmOverwrite(dialog, fname)) { + + // The user doesn't want to override the existing file. So, just restart the loop, + // so the user can select a different path or file name. continue; } lastFilename = Glib::path_get_basename(fname); - if (toSave) { - int retCode; + auto retCode = -1; - if (isPartial) { - // Build partial profile - PartialProfile ppTemp(true); - partialProfileDlg->applyPaste(ppTemp.pparams, ppTemp.pedited, toSave->pparams, nullptr); - // Save partial profile - retCode = ppTemp.pparams->save(fname, "", true, ppTemp.pedited); - // Cleanup - ppTemp.deleteInstance(); - } else { - // Save full profile - retCode = toSave->pparams->save(fname); - } + if (isPartial) { + // Build partial profile + PartialProfile ppTemp(true); + partialProfileDlg->applyPaste(ppTemp.pparams, ppTemp.pedited, toSave->pparams, nullptr); + + // Save partial profile + retCode = ppTemp.pparams->save(fname, "", true, ppTemp.pedited); + + // Cleanup + ppTemp.deleteInstance(); + } else { + // Save full profile + retCode = toSave->pparams->save(fname); + } - if (!retCode) { - const auto ccPrevState = changeconn.block(true); - ProfileStore::getInstance()->parseProfiles(); - changeconn.block(ccPrevState); - } else { - done = false; - writeFailed(dialog, fname); - } + if (retCode == 0) { + // Saving the profile was successfull. + + const auto ccPrevState = changeconn.block(true); + ProfileStore::getInstance()->parseProfiles(); + changeconn.block(ccPrevState); + + // Because saving has been successfull, just leave the loop; + break; + } else { + // Saving the profile was not successfull. + + writeFailed(dialog, fname); + + // In case the saving process was not successfull (missing permissions, ...) + // reopen the dialog and try again. + continue; } } - } while (!done); + } } /* diff --git a/rtgui/thumbbrowserbase.cc b/rtgui/thumbbrowserbase.cc index 8f3499c2a..f697d6648 100644 --- a/rtgui/thumbbrowserbase.cc +++ b/rtgui/thumbbrowserbase.cc @@ -781,6 +781,11 @@ void ThumbBrowserBase::arrangeFiles(ThumbBrowserEntryBase* entry) for (int i = 0; ct < fd.size() && i < numOfCols; ++i, ++ct) { for (; ct < fd.size() && fd[ct]->filtered; ++ct) { + // Thumbs that are not going be drawn should also have a minimum height and width. Cause + // the properties might be used in other parts of the code. The position is just set to be + // zero as a default. + fd[ct]->setPosition(0, 0, colWidths[i], rowHeight); + fd[ct]->drawable = false; }