From 3a538b9b836761d5188d0d0e6fa131354db0fec1 Mon Sep 17 00:00:00 2001 From: Hombre Date: Mon, 19 Aug 2019 20:17:09 +0200 Subject: [PATCH 1/5] RT was crashing when exiting with On Preview Widget displayed see issue #5419 --- rtgui/editorpanel.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 053586bca..e0cc8fd92 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -1090,8 +1090,8 @@ void EditorPanel::close () if (iareapanel) { iareapanel->imageArea->setPreviewHandler (nullptr); iareapanel->imageArea->setImProcCoordinator (nullptr); + tpc->editModeSwitchedOff(); } - tpc->editModeSwitchedOff(); rtengine::StagedImageProcessor::destroy (ipc); ipc = nullptr; From b6d333ee72dcae2b57a7048a367933be8e89d9bf Mon Sep 17 00:00:00 2001 From: Hombre Date: Tue, 20 Aug 2019 00:32:37 +0200 Subject: [PATCH 2/5] "Allow upscaling" in Resize tool wasn't displayed with Scale method (no issue) --- rtgui/resize.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/rtgui/resize.cc b/rtgui/resize.cc index 3789d4693..0525d64af 100644 --- a/rtgui/resize.cc +++ b/rtgui/resize.cc @@ -91,14 +91,13 @@ Resize::Resize () : FoldableToolPanel(this, "resize", M("TP_RESIZE_LABEL"), fals sbox->pack_start (*hbox); sizeBox->pack_start (*sbox, Gtk::PACK_SHRINK, 0); - - allowUpscaling = Gtk::manage(new Gtk::CheckButton(M("TP_RESIZE_ALLOW_UPSCALING"))); - sizeBox->pack_start(*allowUpscaling); - allowUpscaling->signal_toggled().connect(sigc::mem_fun(*this, &Resize::allowUpscalingChanged)); - sizeBox->show_all (); sizeBox->reference (); + allowUpscaling = Gtk::manage(new Gtk::CheckButton(M("TP_RESIZE_ALLOW_UPSCALING"))); + pack_start(*allowUpscaling); + allowUpscaling->signal_toggled().connect(sigc::mem_fun(*this, &Resize::allowUpscalingChanged)); + w->set_digits (0); w->set_increments (1, 100); w->set_value (800); @@ -572,11 +571,13 @@ void Resize::updateGUI () case (0): // Scale mode pack_start (*scale, Gtk::PACK_SHRINK, 4); + reorder_child(*allowUpscaling, 4); break; case (1): // Width mode pack_start (*sizeBox, Gtk::PACK_SHRINK, 4); + reorder_child(*allowUpscaling, 4); w->set_sensitive (true); h->set_sensitive (false); break; @@ -584,6 +585,7 @@ void Resize::updateGUI () case (2): // Height mode pack_start (*sizeBox, Gtk::PACK_SHRINK, 4); + reorder_child(*allowUpscaling, 4); w->set_sensitive (false); h->set_sensitive (true); break; @@ -591,6 +593,7 @@ void Resize::updateGUI () case (3): // Bounding box mode pack_start (*sizeBox, Gtk::PACK_SHRINK, 4); + reorder_child(*allowUpscaling, 4); w->set_sensitive (true); h->set_sensitive (true); break; From ec818167166b4ed9f6b073c6a0e54a8d2555bdc8 Mon Sep 17 00:00:00 2001 From: Hombre57 Date: Wed, 21 Aug 2019 12:31:45 +0200 Subject: [PATCH 3/5] Code cleanup in rtgui/thresholdselector.cc See issue #5423 --- rtgui/thresholdselector.cc | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/rtgui/thresholdselector.cc b/rtgui/thresholdselector.cc index 9b5250862..d9b0921ce 100644 --- a/rtgui/thresholdselector.cc +++ b/rtgui/thresholdselector.cc @@ -629,13 +629,8 @@ void ThresholdSelector::findBoundaries(double &min, double &max) switch (movedCursor) { case (TS_BOTTOMLEFT): if (separatedSliders) { - if (movedCursor == TS_BOTTOMLEFT) { - min = minValBottom; - max = maxValBottom; - } else if (movedCursor == TS_TOPLEFT) { - min = minValTop; - max = maxValTop; - } + min = minValBottom; + max = maxValBottom; } else if (initalEq1) { min = secondaryMovedCursor == TS_UNDEFINED ? positions[TS_TOPLEFT] : minValTop + (positions[TS_BOTTOMLEFT] - positions[TS_TOPLEFT]); max = positions[TS_BOTTOMRIGHT]; @@ -648,13 +643,8 @@ void ThresholdSelector::findBoundaries(double &min, double &max) case (TS_TOPLEFT): if (separatedSliders) { - if (movedCursor == TS_BOTTOMLEFT) { - min = minValBottom; - max = maxValBottom; - } else if (movedCursor == TS_TOPLEFT) { - min = minValTop; - max = maxValTop; - } + min = minValTop; + max = maxValTop; } else if (initalEq1) { min = minValTop; max = secondaryMovedCursor == TS_UNDEFINED ? positions[TS_BOTTOMLEFT] : positions[TS_BOTTOMRIGHT] - (positions[TS_BOTTOMLEFT] - positions[TS_TOPLEFT]); From e93ce860678c4073e09ca35e01d4d802358d4751 Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Wed, 21 Aug 2019 19:03:51 +0200 Subject: [PATCH 4/5] DNG with 'Embed Fast Load Data' not rendered the same as plain DNG or NEF, fixes #4695 --- rtengine/dcraw.cc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index a4450a69a..e15a2bb0f 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -6549,6 +6549,31 @@ guess_cfa_pc: cblack[4] = cblack[5] = MIN(sqrt(len),64); case 50714: /* BlackLevel */ RT_blacklevel_from_constant = ThreeValBool::F; +//----------------------------------------------------------------------------- +// taken from LibRaw. +/* + Copyright 2008-2019 LibRaw LLC (info@libraw.org) + +LibRaw is free software; you can redistribute it and/or modify +it under the terms of the one of two licenses as you choose: + +1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1 + (See file LICENSE.LGPL provided in LibRaw distribution archive for details). + +2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 + (See file LICENSE.CDDL provided in LibRaw distribution archive for details). +*/ + if (tiff_ifd[ifd].samples > 1 && tiff_ifd[ifd].samples == len) // LinearDNG, per-channel black + { + for (i = 0; i < 4 && i < len; i++) + { + double b = getreal(type); + cblack[i] = b+0.5; + } + + black = 0; + } else +//----------------------------------------------------------------------------- if(cblack[4] * cblack[5] == 0) { int dblack[] = { 0,0,0,0 }; black = getreal(type); From 061bf713c80782dd7e1dc551b757c687218cd2a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Thu, 22 Aug 2019 15:25:43 +0200 Subject: [PATCH 5/5] Optimize `milestones` handling in `LCurve` c'tor (fixes #5422) --- rtgui/labcurve.cc | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/rtgui/labcurve.cc b/rtgui/labcurve.cc index 4b25c1e4f..eeb0cd18e 100644 --- a/rtgui/labcurve.cc +++ b/rtgui/labcurve.cc @@ -29,9 +29,6 @@ using namespace rtengine::procparams; LCurve::LCurve () : FoldableToolPanel(this, "labcurves", M("TP_LABCURVE_LABEL"), false, true) { - - std::vector milestones; - brightness = Gtk::manage (new Adjuster (M("TP_LABCURVE_BRIGHTNESS"), -100., 100., 1., 0.)); contrast = Gtk::manage (new Adjuster (M("TP_LABCURVE_CONTRAST"), -100., 100., 1., 0.)); chromaticity = Gtk::manage (new Adjuster (M("TP_LABCURVE_CHROMATICITY"), -100., 100., 1., 0.)); @@ -98,12 +95,12 @@ LCurve::LCurve () : FoldableToolPanel(this, "labcurves", M("TP_LABCURVE_LABEL"), M("TP_LABCURVE_CURVEEDITOR_A_RANGE3"), M("TP_LABCURVE_CURVEEDITOR_A_RANGE4") ); //from green to magenta - milestones.clear(); - milestones.push_back( GradientMilestone(0., 0., 1., 0.) ); - milestones.push_back( GradientMilestone(1., 1., 0., 1.) ); + std::vector milestones = { + GradientMilestone(0., 0., 1., 0.), + GradientMilestone(1., 1., 0., 1.) + }; ashape->setBottomBarBgGradient(milestones); ashape->setLeftBarBgGradient(milestones); - milestones.clear(); bshape = static_cast(curveEditorG->addCurve(CT_Diagonal, "b*")); bshape->setRangeLabels( @@ -113,12 +110,12 @@ LCurve::LCurve () : FoldableToolPanel(this, "labcurves", M("TP_LABCURVE_LABEL"), bshape->setEditID(EUID_Lab_bCurve, BT_SINGLEPLANE_FLOAT); //from blue to yellow - milestones.clear(); - milestones.push_back( GradientMilestone(0., 0., 0., 1.) ); - milestones.push_back( GradientMilestone(1., 1., 1., 0.) ); + milestones = { + GradientMilestone(0., 0., 0., 1.), + GradientMilestone(1., 1., 1., 0.) + }; bshape->setBottomBarBgGradient(milestones); bshape->setLeftBarBgGradient(milestones); - milestones.clear(); curveEditorG->newLine(); // ------------------------------------------------ second line @@ -171,21 +168,23 @@ LCurve::LCurve () : FoldableToolPanel(this, "labcurves", M("TP_LABCURVE_LABEL"), clshape->setLeftBarColorProvider(this, 7); clshape->setRangeDefaultMilestones(0.25, 0.5, 0.75); - milestones.push_back( GradientMilestone(0., 0., 0., 0.) ); - milestones.push_back( GradientMilestone(1., 1., 1., 1.) ); + milestones = { + GradientMilestone(0., 0., 0., 0.), + GradientMilestone(1., 1., 1., 1.) + }; clshape->setBottomBarBgGradient(milestones); // Setting the gradient milestones // from black to white - milestones.push_back( GradientMilestone(0., 0., 0., 0.) ); - milestones.push_back( GradientMilestone(1., 1., 1., 1.) ); + milestones.emplace_back(0., 0., 0., 0.); + milestones.emplace_back(1., 1., 1., 1.); lshape->setBottomBarBgGradient(milestones); lshape->setLeftBarBgGradient(milestones); - milestones.push_back( GradientMilestone(0., 0., 0., 0.) ); - milestones.push_back( GradientMilestone(1., 1., 1., 1.) ); + milestones.emplace_back(0., 0., 0., 0.); + milestones.emplace_back(1., 1., 1., 1.); lcshape->setRangeDefaultMilestones(0.05, 0.2, 0.58); lcshape->setBottomBarBgGradient(milestones); @@ -201,7 +200,7 @@ LCurve::LCurve () : FoldableToolPanel(this, "labcurves", M("TP_LABCURVE_LABEL"), float R, G, B; float x = float(i) * (1.0f / 6.0); Color::hsv2rgb01(x, 0.5f, 0.5f, R, G, B); - milestones.push_back( GradientMilestone(double(x), double(R), double(G), double(B)) ); + milestones.emplace_back(x, R, G, B); } chshape->setBottomBarBgGradient(milestones);