Use default complexity mode defined in preferences when adding tool
This commit is contained in:
@@ -1551,7 +1551,6 @@ PREFERENCES_CLUTSDIR;HaldCLUT directory
|
||||
PREFERENCES_CMMBPC;Black point compensation
|
||||
PREFERENCES_COMPLEXITYLOC;Complexity Local Adjustements
|
||||
PREFERENCES_COMPLEXITY_EXP;Expert
|
||||
PREFERENCES_COMPLEXITY_CONF;Confirmed
|
||||
PREFERENCES_COMPLEXITY_NORM;Normal
|
||||
PREFERENCES_CROP;Crop Editing
|
||||
PREFERENCES_CROP_AUTO_FIT;Automatically zoom to fit the crop
|
||||
|
||||
@@ -94,7 +94,6 @@ ControlSpotPanel::ControlSpotPanel():
|
||||
maskPrevActive(false)
|
||||
{
|
||||
const bool showtooltip = options.showtooltip;
|
||||
const int complexsoft = options.complexity;
|
||||
|
||||
Gtk::HBox* const hbox1_ = Gtk::manage(new Gtk::HBox(true, 4));
|
||||
buttonaddconn_ = button_add_->signal_clicked().connect(
|
||||
@@ -230,10 +229,7 @@ ControlSpotPanel::ControlSpotPanel():
|
||||
sigc::mem_fun(
|
||||
*this, &ControlSpotPanel::shapeMethodChanged));
|
||||
ctboxshapemethod->pack_start(*shapeMethod_);
|
||||
|
||||
if (complexsoft < 2) {
|
||||
pack_start(*ctboxshapemethod);
|
||||
}
|
||||
|
||||
pack_start(*locX_);
|
||||
locX_->setAdjusterListener(this);
|
||||
@@ -271,10 +267,7 @@ ControlSpotPanel::ControlSpotPanel():
|
||||
sigc::mem_fun(
|
||||
*this, &ControlSpotPanel::qualityMethodChanged));
|
||||
ctboxqualitymethod->pack_start(*qualityMethod_);
|
||||
|
||||
if (complexsoft < 2) {
|
||||
pack_start(*ctboxqualitymethod);
|
||||
}
|
||||
|
||||
Gtk::Frame* const transitFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_TRANSIT")));
|
||||
transitFrame->set_label_align(0.025, 0.5);
|
||||
@@ -338,14 +331,8 @@ ControlSpotPanel::ControlSpotPanel():
|
||||
colorde_->set_tooltip_text(M("TP_LOCALLAB_COLORDE_TOOLTIP"));
|
||||
}
|
||||
|
||||
if (complexsoft < 2) {
|
||||
artifBox->pack_start(*struc_);
|
||||
}
|
||||
|
||||
if (complexsoft < 2) {
|
||||
artifBox->pack_start(*thresh_);
|
||||
}
|
||||
|
||||
artifBox->pack_start(*iter_);
|
||||
artifBox->pack_start(*balan_);
|
||||
artifBox->pack_start(*balanh_);
|
||||
@@ -393,10 +380,7 @@ ControlSpotPanel::ControlSpotPanel():
|
||||
savrest_->set_tooltip_text(M("TP_LOCALLAB_SAVREST_TOOLTIP"));
|
||||
}
|
||||
|
||||
if (complexsoft < 1) {
|
||||
maskBox->pack_start(*laplac_);
|
||||
}
|
||||
|
||||
maskBox->pack_start(*deltae_);
|
||||
maskBox->pack_start(*scopemask_);
|
||||
// maskBox->pack_start(*shortc_);
|
||||
|
||||
@@ -20,14 +20,11 @@
|
||||
* 2019 Pierre Cabrera <pierre.cab@gmail.com>
|
||||
*/
|
||||
#include "locallab.h"
|
||||
#include "options.h"
|
||||
#include "../rtengine/procparams.h"
|
||||
|
||||
using namespace rtengine;
|
||||
using namespace procparams;
|
||||
|
||||
extern Options options;
|
||||
|
||||
/* ==== LocallabToolList ==== */
|
||||
LocallabToolList::LocallabToolList():
|
||||
// Tool list GUI elements
|
||||
@@ -219,9 +216,6 @@ Locallab::Locallab():
|
||||
|
||||
void Locallab::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited)
|
||||
{
|
||||
// printf("Locallab read\n");
|
||||
const int complexsoft = options.complexity;
|
||||
|
||||
// Disable all listeners
|
||||
disableListener();
|
||||
|
||||
@@ -264,7 +258,6 @@ void Locallab::read(const rtengine::procparams::ProcParams* pp, const ParamsEdit
|
||||
r->sensiexclu = pp->locallab.spots.at(i).sensiexclu;
|
||||
r->structexclu = pp->locallab.spots.at(i).structexclu;
|
||||
|
||||
if (complexsoft < 2) {
|
||||
if (pp->locallab.spots.at(i).shapeMethod == "IND") {
|
||||
r->shapeMethod = 0;
|
||||
} else if (pp->locallab.spots.at(i).shapeMethod == "SYM") {
|
||||
@@ -274,9 +267,6 @@ void Locallab::read(const rtengine::procparams::ProcParams* pp, const ParamsEdit
|
||||
} else {
|
||||
r->shapeMethod = 3;
|
||||
}
|
||||
} else {
|
||||
r->shapeMethod = 0;
|
||||
}
|
||||
|
||||
r->locX = pp->locallab.spots.at(i).loc.at(0);
|
||||
r->locXL = pp->locallab.spots.at(i).loc.at(1);
|
||||
|
||||
@@ -190,7 +190,22 @@ void LocallabTool::addLocallabTool(bool raiseEvent)
|
||||
exp->set_visible(true);
|
||||
|
||||
// Raise event if required
|
||||
if (raiseEvent) {
|
||||
if (raiseEvent) { // Note: Event is only raised when a tool is added by user
|
||||
if (needMode) {
|
||||
// Set complexity mode according to chosen default one
|
||||
complexityConn.block(true);
|
||||
complexity->set_active(options.complexity);
|
||||
complexityConn.block(false);
|
||||
|
||||
// Update GUI accordingly
|
||||
if (complexity->get_active_row_number() == Normal) {
|
||||
convertParamToNormal();
|
||||
updateGUIToMode(Normal);
|
||||
} else {
|
||||
updateGUIToMode(Expert);
|
||||
}
|
||||
}
|
||||
|
||||
if (listener) {
|
||||
listener->panelChanged(EvlocallabToolAdded,
|
||||
toolName + " (" + escapeHtmlChars(spotName) + ")");
|
||||
|
||||
@@ -451,7 +451,7 @@ void Options::setDefaults()
|
||||
histogramHeight = 200;
|
||||
histogramDrawMode = 0;
|
||||
curvebboxpos = 1;
|
||||
complexity = 2;
|
||||
complexity = 1;
|
||||
prevdemo = PD_Sidecar;
|
||||
|
||||
rgbDenoiseThreadLimit = 0;
|
||||
|
||||
@@ -939,16 +939,10 @@ Gtk::Widget* Preferences::getGeneralPanel()
|
||||
complexitylocal = Gtk::manage(new Gtk::ComboBoxText());
|
||||
setExpandAlignProperties(complexitylocal, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
|
||||
complexitylocal->append(M("PREFERENCES_COMPLEXITY_EXP"));
|
||||
complexitylocal->append(M("PREFERENCES_COMPLEXITY_CONF"));
|
||||
complexitylocal->append(M("PREFERENCES_COMPLEXITY_NORM"));
|
||||
complexitylocal->set_active(2);
|
||||
Gtk::Label* complexitylocalRestartL = Gtk::manage(new Gtk::Label(Glib::ustring("(") + M("PREFERENCES_APPLNEXTSTARTUP") + ")"));
|
||||
setExpandAlignProperties(complexitylocalRestartL, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
|
||||
complexitylocal->set_active(1);
|
||||
workflowGrid->attach_next_to(*complexityL, *curveBBoxPosL, Gtk::POS_BOTTOM, 1, 1);
|
||||
workflowGrid->attach_next_to(*complexitylocal, *curveBBoxPosC, Gtk::POS_BOTTOM, 1, 1);
|
||||
workflowGrid->attach_next_to(*complexitylocalRestartL, *curveBBoxPosRestartL, Gtk::POS_BOTTOM, 1, 1);
|
||||
|
||||
|
||||
|
||||
ckbHistogramPositionLeft = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_HISTOGRAMPOSITIONLEFT")));
|
||||
setExpandAlignProperties(ckbHistogramPositionLeft, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
|
||||
|
||||
Reference in New Issue
Block a user