Added missing checkbox for film negative feature in partial apply / partial paste dialogs.

This commit is contained in:
rom9
2019-06-11 22:13:16 +02:00
parent 8fa30d496d
commit 5ddc4a3e0e
3 changed files with 22 additions and 0 deletions

View File

@@ -134,6 +134,9 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren
raw_ca_autocorrect = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWCACORR_AUTO")));
raw_caredblue = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWCACORR_CAREDBLUE")));
raw_ca_avoid_colourshift = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWCACORR_AVOIDCOLORSHIFT")));
//---
filmNegative = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_FILMNEGATIVE")) );
Gtk::VBox* vboxes[8];
Gtk::HSeparator* hseps[8];
@@ -249,6 +252,9 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren
vboxes[7]->pack_start (*raw_ca_autocorrect, Gtk::PACK_SHRINK, 2);
vboxes[7]->pack_start (*raw_caredblue, Gtk::PACK_SHRINK, 2);
vboxes[7]->pack_start (*raw_ca_avoid_colourshift, Gtk::PACK_SHRINK, 2);
vboxes[7]->pack_start (*Gtk::manage (new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 0);
vboxes[7]->pack_start (*filmNegative, Gtk::PACK_SHRINK, 2);
Gtk::VBox* vbCol1 = Gtk::manage (new Gtk::VBox ());
Gtk::VBox* vbCol2 = Gtk::manage (new Gtk::VBox ());
@@ -396,6 +402,8 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren
raw_ca_autocorrectConn = raw_ca_autocorrect->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true));
raw_caredblueConn = raw_caredblue->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true));
raw_ca_avoid_colourshiftconn = raw_ca_avoid_colourshift->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true));
//---
filmNegativeConn = filmNegative->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true));
add_button (M("GENERAL_OK"), Gtk::RESPONSE_OK);
add_button (M("GENERAL_CANCEL"), Gtk::RESPONSE_CANCEL);
@@ -467,6 +475,7 @@ void PartialPasteDlg::rawToggled ()
ConnectionBlocker raw_ca_autocorrectBlocker(raw_ca_autocorrectConn);
ConnectionBlocker raw_caredblueBlocker(raw_caredblueConn);
ConnectionBlocker raw_ca_avoid_colourshiftBlocker(raw_ca_avoid_colourshiftconn);
ConnectionBlocker filmNegativeBlocker(filmNegativeConn);
raw->set_inconsistent (false);
@@ -495,6 +504,7 @@ void PartialPasteDlg::rawToggled ()
raw_ca_autocorrect->set_active (raw->get_active ());
raw_caredblue->set_active (raw->get_active ());
raw_ca_avoid_colourshift->set_active (raw->get_active ());
filmNegative->set_active (raw->get_active());
}
void PartialPasteDlg::basicToggled ()
@@ -966,6 +976,14 @@ void PartialPasteDlg::applyPaste (rtengine::procparams::ProcParams* dstPP, Param
filterPE.raw.ff_AutoClipControl = falsePE.raw.ff_AutoClipControl;
}
if (!filmNegative->get_active ()) {
filterPE.filmNegative.enabled = falsePE.filmNegative.enabled;
filterPE.filmNegative.redExp = falsePE.filmNegative.redExp;
filterPE.filmNegative.greenExp = falsePE.filmNegative.greenExp;
filterPE.filmNegative.blueExp = falsePE.filmNegative.blueExp;
}
if (dstPE) {
*dstPE = filterPE;
}