Resize baBehav on load (#4828)

This commit is contained in:
Flössie
2018-12-15 15:12:52 +01:00
parent f6a7e43ba0
commit 1ebbe0a096
2 changed files with 14 additions and 13 deletions

View File

@@ -126,7 +126,7 @@ void BatchToolPanelCoordinator::initSession ()
pparams = selected[0]->getProcParams (); pparams = selected[0]->getProcParams ();
coarse->initBatchBehavior (); coarse->initBatchBehavior ();
int w,h; int w,h;
selected[0]->getOriginalSize(w,h); selected[0]->getOriginalSize(w,h);
crop->setDimensions (w, h); crop->setDimensions (w, h);
@@ -707,11 +707,11 @@ void BatchToolPanelCoordinator::spotWBselected (int x, int y, Thumbnail* thm)
double otemp = initialPP[i].wb.temperature; double otemp = initialPP[i].wb.temperature;
double ogreen = initialPP[i].wb.green; double ogreen = initialPP[i].wb.green;
if (options.baBehav[12]) { if (options.baBehav[ADDSET_ROTATE_DEGREE]) {
temp = temp - otemp; temp = temp - otemp;
} }
if (options.baBehav[13]) { if (options.baBehav[ADDSET_DIST_AMOUNT]) {
green = green - ogreen; green = green - ogreen;
} }

View File

@@ -1283,27 +1283,27 @@ void Options::readFromFile(Glib::ustring fname)
if (keyFile.has_key("GUI", "HistogramPosition")) { if (keyFile.has_key("GUI", "HistogramPosition")) {
histogramPosition = keyFile.get_integer("GUI", "HistogramPosition"); histogramPosition = keyFile.get_integer("GUI", "HistogramPosition");
} }
if (keyFile.has_key("GUI", "HistogramRed")) { if (keyFile.has_key("GUI", "HistogramRed")) {
histogramRed = keyFile.get_boolean("GUI", "HistogramRed"); histogramRed = keyFile.get_boolean("GUI", "HistogramRed");
} }
if (keyFile.has_key("GUI", "HistogramGreen")) { if (keyFile.has_key("GUI", "HistogramGreen")) {
histogramGreen = keyFile.get_boolean("GUI", "HistogramGreen"); histogramGreen = keyFile.get_boolean("GUI", "HistogramGreen");
} }
if (keyFile.has_key("GUI", "HistogramBlue")) { if (keyFile.has_key("GUI", "HistogramBlue")) {
histogramBlue = keyFile.get_boolean("GUI", "HistogramBlue"); histogramBlue = keyFile.get_boolean("GUI", "HistogramBlue");
} }
if (keyFile.has_key("GUI", "HistogramLuma")) { if (keyFile.has_key("GUI", "HistogramLuma")) {
histogramLuma = keyFile.get_boolean("GUI", "HistogramLuma"); histogramLuma = keyFile.get_boolean("GUI", "HistogramLuma");
} }
if (keyFile.has_key("GUI", "HistogramChroma")) { if (keyFile.has_key("GUI", "HistogramChroma")) {
histogramChroma = keyFile.get_boolean("GUI", "HistogramChroma"); histogramChroma = keyFile.get_boolean("GUI", "HistogramChroma");
} }
if (keyFile.has_key("GUI", "HistogramRAW")) { if (keyFile.has_key("GUI", "HistogramRAW")) {
histogramRAW = keyFile.get_boolean("GUI", "HistogramRAW"); histogramRAW = keyFile.get_boolean("GUI", "HistogramRAW");
} }
@@ -1311,11 +1311,11 @@ void Options::readFromFile(Glib::ustring fname)
if (keyFile.has_key("GUI", "HistogramBar")) { if (keyFile.has_key("GUI", "HistogramBar")) {
histogramBar = keyFile.get_boolean("GUI", "HistogramBar"); histogramBar = keyFile.get_boolean("GUI", "HistogramBar");
} }
if (keyFile.has_key ("GUI", "HistogramHeight")) { if (keyFile.has_key ("GUI", "HistogramHeight")) {
histogramHeight = keyFile.get_integer ("GUI", "HistogramHeight"); histogramHeight = keyFile.get_integer ("GUI", "HistogramHeight");
} }
if (keyFile.has_key ("GUI", "HistogramDrawMode")) { if (keyFile.has_key ("GUI", "HistogramDrawMode")) {
histogramDrawMode = keyFile.get_integer ("GUI", "HistogramDrawMode"); histogramDrawMode = keyFile.get_integer ("GUI", "HistogramDrawMode");
} }
@@ -1507,7 +1507,7 @@ void Options::readFromFile(Glib::ustring fname)
if (rtSettings.ACESp0 == "RTv4_ACES-AP0") { if (rtSettings.ACESp0 == "RTv4_ACES-AP0") {
rtSettings.ACESp0 = "RTv2_ACES-AP0"; rtSettings.ACESp0 = "RTv2_ACES-AP0";
} }
} }
if (keyFile.has_key("Color Management", "ACES-AP1")) { if (keyFile.has_key("Color Management", "ACES-AP1")) {
@@ -1515,7 +1515,7 @@ void Options::readFromFile(Glib::ustring fname)
if (rtSettings.ACESp1 == "RTv4_ACES-AP1") { if (rtSettings.ACESp1 == "RTv4_ACES-AP1") {
rtSettings.ACESp1 = "RTv2_ACES-AP1"; rtSettings.ACESp1 = "RTv2_ACES-AP1";
} }
} }
if (keyFile.has_key("Color Management", "GamutLch")) { if (keyFile.has_key("Color Management", "GamutLch")) {
@@ -1593,6 +1593,7 @@ void Options::readFromFile(Glib::ustring fname)
if (keyFile.has_group("Batch Processing")) { if (keyFile.has_group("Batch Processing")) {
if (keyFile.has_key("Batch Processing", "AdjusterBehavior")) { if (keyFile.has_key("Batch Processing", "AdjusterBehavior")) {
baBehav = keyFile.get_integer_list("Batch Processing", "AdjusterBehavior"); baBehav = keyFile.get_integer_list("Batch Processing", "AdjusterBehavior");
baBehav.resize(ADDSET_PARAM_NUM);
} }
} }