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); 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; 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; 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]);