diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index ba3b5b068..2c3b5971f 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -3003,9 +3003,6 @@ void ProcParams::setDefaults() int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bool fnameAbsolute, ParamsEdited* pedited) { - // TODO Locallab printf - printf("Save to .pp3 file\n"); - if (fname.empty() && fname2.empty()) { return 0; } diff --git a/rtgui/batchtoolpanelcoord.cc b/rtgui/batchtoolpanelcoord.cc index 1adbaa2de..a7cd8c5e2 100644 --- a/rtgui/batchtoolpanelcoord.cc +++ b/rtgui/batchtoolpanelcoord.cc @@ -59,11 +59,6 @@ void BatchToolPanelCoordinator::closeSession (bool save) // Should remain commented for Locallab to work // pparamsEdited.set (false); - printf("closeSession\n"); - printf("closeSession pedited %d\n", (int)pparamsEdited.locallab.spots.size()); - printf("closeSession pparams %d\n", (int)pparams.locallab.spots.size()); - printf("closeSession nbspot %d\n", (int)pparams.locallab.nbspot); - printf("closeSession pedited nbspot %d\n", pparamsEdited.locallab.nbspot); for (size_t i = 0; i < selected.size(); i++) { selected[i]->removeThumbnailListener (this); @@ -76,18 +71,12 @@ void BatchToolPanelCoordinator::closeSession (bool save) toolPanels[i]->write (&pparams, &pparamsEdited); } - printf("closeSession 2 pedited %d\n", (int)pparamsEdited.locallab.spots.size()); - printf("closeSession 2 pparams %d\n", (int)pparams.locallab.spots.size()); - printf("closeSession 2 nbspot %d\n", (int)pparams.locallab.nbspot); - printf("closeSession 2 pedited nbspot %d\n", pparamsEdited.locallab.nbspot); - // combine with initial parameters and set ProcParams newParams; for (size_t i = 0; i < selected.size(); i++) { newParams = initialPP[i]; pparamsEdited.combine (newParams, pparams, selected.size() == 1); - printf("newParams%d->nbspot %d, size %d\n", (int)i, newParams.locallab.nbspot, (int)newParams.locallab.spots.size()); // trim new adjuster's values to the adjuster's limits for (unsigned int j = 0; j < toolPanels.size(); j++) { @@ -407,8 +396,6 @@ void BatchToolPanelCoordinator::panelChanged (rtengine::ProcEvent event, const G return; } - printf("panelChanged batch mode\n"); - somethingChanged = true; // Should remain commented for Locallab to work @@ -572,10 +559,6 @@ void BatchToolPanelCoordinator::panelChanged (rtengine::ProcEvent event, const G for (size_t i = 0; i < paramcListeners.size(); i++) { paramcListeners[i]->procParamsChanged (&pparams, event, descr, &pparamsEdited); } - - printf("panel changed pedited %d\n", (int)pparamsEdited.locallab.spots.size()); - printf("panel changed pparams %d\n", (int)pparams.locallab.spots.size()); - printf("panel changed nbspot %d\n", (int)pparams.locallab.nbspot); } void BatchToolPanelCoordinator::getAutoWB (double& temp, double& green, double equal, double tempBias) diff --git a/rtgui/controlspotpanel.cc b/rtgui/controlspotpanel.cc index e8d70fadf..3f1adabe0 100644 --- a/rtgui/controlspotpanel.cc +++ b/rtgui/controlspotpanel.cc @@ -279,7 +279,7 @@ void ControlSpotPanel::render_isvisible( void ControlSpotPanel::on_button_add() { - printf("on_button_add\n"); + // printf("on_button_add\n"); if (!listener) { return; @@ -295,7 +295,7 @@ void ControlSpotPanel::on_button_add() void ControlSpotPanel::on_button_delete() { - printf("on_button_delete\n"); + // printf("on_button_delete\n"); if (!listener) { return; @@ -311,7 +311,7 @@ void ControlSpotPanel::on_button_delete() void ControlSpotPanel::on_button_duplicate() { - printf("on_button_duplicate\n"); + // printf("on_button_duplicate\n"); if (!listener) { return; @@ -333,7 +333,7 @@ void ControlSpotPanel::on_button_duplicate() void ControlSpotPanel::on_button_rename() { - printf("on_button_rename\n"); + // printf("on_button_rename\n"); if (!listener) { return; @@ -367,7 +367,7 @@ void ControlSpotPanel::on_button_rename() void ControlSpotPanel::on_button_visibility() { - printf("on_button_visibility\n"); + // printf("on_button_visibility\n"); if (!listener) { return; @@ -400,7 +400,8 @@ void ControlSpotPanel::on_button_visibility() void ControlSpotPanel::load_ControlSpot_param() { - printf("load_ControlSpot_param\n"); + // printf("load_ControlSpot_param\n"); + // Get selected control spot const auto s = treeview_.get_selection(); @@ -432,7 +433,7 @@ void ControlSpotPanel::load_ControlSpot_param() void ControlSpotPanel::controlspotChanged() { - printf("controlspotChanged\n"); + // printf("controlspotChanged\n"); if (!listener) { return; @@ -447,7 +448,7 @@ void ControlSpotPanel::controlspotChanged() void ControlSpotPanel::shapeChanged() { - printf("shapeChanged\n"); + // printf("shapeChanged\n"); // Get selected control spot const auto s = treeview_.get_selection(); @@ -470,7 +471,7 @@ void ControlSpotPanel::shapeChanged() void ControlSpotPanel::spotMethodChanged() { - printf("spotMethodChanged\n"); + // printf("spotMethodChanged\n"); // Get selected control spot const auto s = treeview_.get_selection(); @@ -501,7 +502,8 @@ void ControlSpotPanel::spotMethodChanged() void ControlSpotPanel::shapeMethodChanged() { - printf("shapeMethodChanged\n"); + // printf("shapeMethodChanged\n"); + const int method = shapeMethod_->get_active_row_number(); // Get selected control spot @@ -580,7 +582,7 @@ void ControlSpotPanel::shapeMethodChanged() void ControlSpotPanel::qualityMethodChanged() { - printf("qualityMethodChanged\n"); + // printf("qualityMethodChanged\n"); // Get selected control spot const auto s = treeview_.get_selection(); @@ -602,7 +604,7 @@ void ControlSpotPanel::qualityMethodChanged() void ControlSpotPanel::updateParamVisibility() { - printf("updateParamVisibility\n"); + // printf("updateParamVisibility\n"); // Update Control Spot GUI according to shapeMethod_ combobox state (to be compliant with shapeMethodChanged function) const int method = shapeMethod_->get_active_row_number(); @@ -660,7 +662,8 @@ void ControlSpotPanel::updateParamVisibility() void ControlSpotPanel::adjusterChanged(Adjuster* a, double newval) { - printf("adjusterChanged\n"); + // printf("adjusterChanged\n"); + const int method = shapeMethod_->get_active_row_number(); // Get selected control spot @@ -805,7 +808,8 @@ void ControlSpotPanel::adjusterChanged(Adjuster* a, double newval) void ControlSpotPanel::disableParamlistener(bool cond) { - printf("disableParamlistener: %d\n", cond); + // printf("disableParamlistener: %d\n", cond); + treeviewconn_.block(cond); buttonaddconn_.block(cond); buttondeleteconn_.block(cond); @@ -854,7 +858,7 @@ void ControlSpotPanel::setParamEditable(bool cond) void ControlSpotPanel::addControlSpotCurve(Gtk::TreeModel::Row row) { - printf("addControlSpotCurve\n"); + // printf("addControlSpotCurve\n"); if (row[spots_.curveid] > 0) { // Row has already an associated curve return; @@ -983,7 +987,7 @@ void ControlSpotPanel::updateControlSpotCurve(Gtk::TreeModel::Row row) const int shape_ = static_cast(row[spots_.shape]); const bool isvisible_ = static_cast(row[spots_.isvisible]); - printf("updateControlSpotCurve: %d\n", curveid_); + // printf("updateControlSpotCurve: %d\n", curveid_); EditDataProvider* dataProvider = getEditProvider(); @@ -1135,7 +1139,7 @@ void ControlSpotPanel::deleteControlSpotCurve(Gtk::TreeModel::Row row) return; } - printf("deleteControlSpotCurve: %d\n", curveid_); + // printf("deleteControlSpotCurve: %d\n", curveid_); // visibleGeometry EditSubscriber::visibleGeometry.erase(EditSubscriber::visibleGeometry.begin() + (curveid_ - 1) * 10 + 9); @@ -1177,7 +1181,8 @@ void ControlSpotPanel::deleteControlSpotCurve(Gtk::TreeModel::Row row) CursorShape ControlSpotPanel::getCursor(int objectID) { - printf("Object ID: %d\n", objectID); + // printf("Object ID: %d\n", objectID); + int rem_ = objectID % 10; switch (rem_) { @@ -1321,7 +1326,8 @@ bool ControlSpotPanel::mouseOver(int modifierKey) bool ControlSpotPanel::button1Pressed(int modifierKey) { - printf("button1Pressed\n"); + // printf("button1Pressed\n"); + EditDataProvider *provider = getEditProvider(); if (!provider || lastObject_ == -1) { @@ -1348,14 +1354,15 @@ bool ControlSpotPanel::button1Pressed(int modifierKey) bool ControlSpotPanel::button1Released() { - printf("button1Released\n"); + // printf("button1Released\n"); + EditSubscriber::action = ES_ACTION_NONE; return true; } bool ControlSpotPanel::drag1(int modifierKey) { - printf("drag1\n"); + // printf("drag1\n"); EditDataProvider *provider = getEditProvider(); @@ -1488,7 +1495,7 @@ int ControlSpotPanel::getEventType() ControlSpotPanel::SpotRow* ControlSpotPanel::getSpot(int id) { - printf("getSpot: %d\n", id); + // printf("getSpot: %d\n", id); MyMutex::MyLock lock(mTreeview); @@ -1547,7 +1554,7 @@ std::vector* ControlSpotPanel::getSpotIdList() int ControlSpotPanel::getSelectedSpot() { - printf("getSelectedSpot\n"); + // printf("getSelectedSpot\n"); MyMutex::MyLock lock(mTreeview); @@ -1567,7 +1574,7 @@ int ControlSpotPanel::getSelectedSpot() void ControlSpotPanel::setSelectedSpot(int id) { - printf("setSelectedSpot: %d\n", id); + // printf("setSelectedSpot: %d\n", id); MyMutex::MyLock lock(mTreeview); @@ -1612,7 +1619,7 @@ int ControlSpotPanel::getNewId() void ControlSpotPanel::addControlSpot(SpotRow* newSpot) { - printf("addControlSpot: %d\n", newSpot->id); + // printf("addControlSpot: %d\n", newSpot->id); MyMutex::MyLock lock(mTreeview); @@ -1648,7 +1655,7 @@ void ControlSpotPanel::addControlSpot(SpotRow* newSpot) int ControlSpotPanel::updateControlSpot(SpotRow* spot) { - printf("updateControlSpot: %d\n", spot->id); + // printf("updateControlSpot: %d\n", spot->id); MyMutex::MyLock lock(mTreeview); @@ -1694,7 +1701,7 @@ int ControlSpotPanel::updateControlSpot(SpotRow* spot) void ControlSpotPanel::deleteControlSpot(int id) { - printf("deleteControlSpot: %d\n", id); + // printf("deleteControlSpot: %d\n", id); MyMutex::MyLock lock(mTreeview); @@ -1718,7 +1725,7 @@ void ControlSpotPanel::deleteControlSpot(int id) ControlSpotPanel::SpotEdited* ControlSpotPanel::getEditedStates() { - printf("getEditedStates\n"); + // printf("getEditedStates\n"); SpotEdited* se = new SpotEdited(); @@ -1772,7 +1779,7 @@ ControlSpotPanel::SpotEdited* ControlSpotPanel::getEditedStates() void ControlSpotPanel::setEditedStates(SpotEdited* se) { - printf("setEditedStates\n"); + // printf("setEditedStates\n"); // Reset treeview edited states nbSpotChanged_ = false; @@ -1844,8 +1851,6 @@ void ControlSpotPanel::setDefaults(const ProcParams * defParams, const ParamsEdi int index = -1; for (int i = 0; i < (int)defParams->locallab.spots.size(); i++) { - printf("Test\n"); - if (defParams->locallab.spots.at(i).id == id) { index = i; @@ -1853,8 +1858,6 @@ void ControlSpotPanel::setDefaults(const ProcParams * defParams, const ParamsEdi } } - printf("index: %d\n", index); - // Set default values for adjusters const LocallabParams::LocallabSpot* defSpot = new LocallabParams::LocallabSpot(); @@ -1911,39 +1914,6 @@ void ControlSpotPanel::setDefaults(const ProcParams * defParams, const ParamsEdi } } -/* -void ControlSpotPanel::updateDefaultsValues(const rtengine::procparams::ProcParams* defParams, int id) -{ - const LocallabParams::LocallabSpot* defSpot = new LocallabParams::LocallabSpot(); - - for (int i = 0; i < (int)defParams->locallab.spots.size(); i++) { - if (defParams->locallab.spots.at(i).id == id) { - defSpot = &defParams->locallab.spots.at(i); - - break; - } - } - - // Set default values for adjusters - sensiexclu_->setDefault((double)defSpot->sensiexclu); - struc_->setDefault((double)defSpot->struc); - locX_->setDefault((double)defSpot->locX); - locXL_->setDefault((double)defSpot->locXL); - locY_->setDefault((double)defSpot->locY); - locYT_->setDefault((double)defSpot->locYT); - centerX_->setDefault((double)defSpot->centerX); - centerY_->setDefault((double)defSpot->centerY); - circrad_->setDefault((double)defSpot->circrad); - transit_->setDefault((double)defSpot->transit); - thresh_->setDefault((double)defSpot->thresh); - iter_->setDefault((double)defSpot->iter); -} - -void ControlSpotPanel::updateDefaultsStates(const ParamsEdited* pedited, int id = 0) -{ -} -*/ - void ControlSpotPanel::setBatchMode(bool batchMode) { ToolPanel::setBatchMode(batchMode); diff --git a/rtgui/controlspotpanel.h b/rtgui/controlspotpanel.h index 9e250dc60..d06914d47 100644 --- a/rtgui/controlspotpanel.h +++ b/rtgui/controlspotpanel.h @@ -182,13 +182,6 @@ public: * @param id Spot id to consider to update adjusters default values and default state values */ void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr, int id = 0); - /** - * Variant of setDefaults function which only update adjuster default values - * - * @param defParams ProcParams containing default values to set to the adjusters - * @param id Spot id to consider to update adjusters default values - */ - // void updateDefaultsValues(const rtengine::procparams::ProcParams* defParams, int id = 0); /** * Variant of setDefaults function which only update adjuster default states * diff --git a/rtgui/history.cc b/rtgui/history.cc index cea2f7452..64cdcbdc0 100644 --- a/rtgui/history.cc +++ b/rtgui/history.cc @@ -186,12 +186,6 @@ void History::historySelectionChanged () PartialProfile pp (&pparams, &pe); ParamsEdited paramsEdited = row[historyColumns.paramsEdited]; - printf("historySelectionChanged\n"); - printf("nbspot: %d %d\n", pp.pparams->locallab.nbspot, (int)pp.pparams->locallab.spots.size()); - for (size_t i = 0; i < pp.pparams->locallab.spots.size(); i++) { - printf("id_%d = %d\n", (int)i, pp.pparams->locallab.spots.at(i).id); - } - tpc->profileChange (&pp, EvHistoryBrowsed, row[historyColumns.text], ¶msEdited); } diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index fd637fdd1..86e7ed3df 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -645,8 +645,7 @@ void Locallab::foldAllButMe(GdkEventButton* event, MyExpander *expander) void Locallab::enableToggled(MyExpander *expander) { - // TODO Locallab printf - printf("enableToggled\n"); + // printf("enableToggled\n"); rtengine::ProcEvent event; sigc::connection* expConn; @@ -735,8 +734,7 @@ void Locallab::updateToolState(std::vector &tpOpen) void Locallab::lumaneutralPressed() { - // TODO Locallab printf - printf("lumaneutralPressed\n"); + // printf("lumaneutralPressed\n"); for (int i = 0; i < 5; i++) { multiplier[i]->setValue(100); @@ -748,8 +746,7 @@ void Locallab::lumaneutralPressed() void Locallab::lumacontrastPlusPressed() { - // TODO Locallab printf - printf("lumacontrastPlusPressed\n"); + // printf("lumacontrastPlusPressed\n"); for (int i = 0; i < 5; i++) { float inc = (5 - i); @@ -762,8 +759,7 @@ void Locallab::lumacontrastPlusPressed() void Locallab::lumacontrastMinusPressed() { - // TODO Locallab printf - printf("lumacontrastMinusPressed\n"); + // printf("lumacontrastMinusPressed\n"); for (int i = 0; i < 5; i++) { float inc = - (5 - i); @@ -776,163 +772,11 @@ void Locallab::lumacontrastMinusPressed() void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited) { - printf("Locallab read\n"); + // printf("Locallab read\n"); // Disable all listeners disableListener(); - /* - if (pedited) { - set_inconsistent(multiImage && !pedited->locallab.enabled); - - if (pp->locallab.selspot < pp->locallab.nbspot && pp->locallab.selspot < (int)pedited->locallab.spots.size()) { - const LocallabParamsEdited::LocallabSpotEdited* spotState = &pedited->locallab.spots.at(pp->locallab.selspot); - - // Control spot settings - ControlSpotPanel::SpotEdited* const se = new ControlSpotPanel::SpotEdited(); - - if (pedited->locallab.nbspot && pedited->locallab.id) { - se->nbspot = true; - } else { - se->nbspot = false; - } - - se->selspot = pedited->locallab.selspot; - se->name = spotState->name; - se->isvisible = spotState->isvisible; - se->shape = spotState->shape; - se->spotMethod = spotState->spotMethod; - se->sensiexclu = spotState->sensiexclu; - se->struc = spotState->struc; - se->shapeMethod = spotState->shapeMethod; - se->locX = spotState->locX; - se->locXL = spotState->locXL; - se->locY = spotState->locY; - se->locYT = spotState->locYT; - se->centerX = spotState->centerX; - se->centerY = spotState->centerY; - se->circrad = spotState->circrad; - se->qualityMethod = spotState->qualityMethod; - se->transit = spotState->transit; - se->thresh = spotState->thresh; - se->iter = spotState->iter; - expsettings->setEditedStates(se); - - // Color & Light - expcolor->set_inconsistent(!spotState->expcolor); - curvactiv->set_inconsistent(multiImage && !spotState->curvactiv); - lightness->setEditedState(spotState->lightness ? Edited : UnEdited); - contrast->setEditedState(spotState->contrast ? Edited : UnEdited); - chroma->setEditedState(spotState->chroma ? Edited : UnEdited); - sensi->setEditedState(spotState->sensi ? Edited : UnEdited); - - if (!spotState->qualitycurveMethod) { - qualitycurveMethod->set_active_text(M("GENERAL_UNCHANGED")); - } - - llshape->setUnChanged(!spotState->llcurve); - ccshape->setUnChanged(!spotState->cccurve); - LHshape->setUnChanged(!spotState->LHcurve); - HHshape->setUnChanged(!spotState->HHcurve); - invers->set_inconsistent(multiImage && !spotState->invers); - - // Exposure - expexpose->set_inconsistent(!spotState->expexpose); - expcomp->setEditedState(spotState->expcomp ? Edited : UnEdited); - hlcompr->setEditedState(spotState->hlcompr ? Edited : UnEdited); - hlcomprthresh->setEditedState(spotState->hlcomprthresh ? Edited : UnEdited); - black->setEditedState(spotState->black ? Edited : UnEdited); - warm->setEditedState(spotState->warm ? Edited : UnEdited); - shcompr->setEditedState(spotState->shcompr ? Edited : UnEdited); - sensiex->setEditedState(spotState->sensiex ? Edited : UnEdited); - shapeexpos->setUnChanged(!spotState->excurve); - - // Vibrance - expvibrance->set_inconsistent(!spotState->expvibrance); - saturated->setEditedState(spotState->saturated ? Edited : UnEdited); - pastels->setEditedState(spotState->pastels ? Edited : UnEdited); - psThreshold->setEditedState(spotState->psthreshold ? Edited : UnEdited); - protectSkins->set_inconsistent(multiImage && !spotState->protectskins); - avoidColorShift->set_inconsistent(multiImage && !spotState->avoidcolorshift); - pastSatTog->set_inconsistent(multiImage && !spotState->pastsattog); - sensiv->setEditedState(spotState->sensiv ? Edited : UnEdited); - skinTonesCurve->setUnChanged(!spotState->skintonescurve); - - // Blur & Noise - expblur->set_inconsistent(!spotState->expblur); - radius->setEditedState(spotState->radius ? Edited : UnEdited); - strength->setEditedState(spotState->strength ? Edited : UnEdited); - sensibn->setEditedState(spotState->sensibn ? Edited : UnEdited); - - if (!spotState->blurMethod) { - blurMethod->set_active_text(M("GENERAL_UNCHANGED")); - } - - activlum->set_inconsistent(multiImage && !spotState->activlum); - - // Tone Mapping - exptonemap->set_inconsistent(!spotState->exptonemap); - stren->setEditedState(spotState->stren ? Edited : UnEdited); - gamma->setEditedState(spotState->gamma ? Edited : UnEdited); - estop->setEditedState(spotState->estop ? Edited : UnEdited); - scaltm->setEditedState(spotState->scaltm ? Edited : UnEdited); - rewei->setEditedState(spotState->rewei ? Edited : UnEdited); - sensitm->setEditedState(spotState->sensitm ? Edited : UnEdited); - - // Retinex - expreti->set_inconsistent(!spotState->expreti); - - if (!spotState->retinexMethod) { - retinexMethod->set_active_text(M("GENERAL_UNCHANGED")); - } - - str->setEditedState(spotState->str ? Edited : UnEdited); - chrrt->setEditedState(spotState->chrrt ? Edited : UnEdited); - neigh->setEditedState(spotState->neigh ? Edited : UnEdited); - vart->setEditedState(spotState->vart ? Edited : UnEdited); - sensih->setEditedState(spotState->sensih ? Edited : UnEdited); - cTgainshape->setUnChanged(!spotState->localTgaincurve); - inversret->set_inconsistent(multiImage && !spotState->inversret); - - // Sharpening - expsharp->set_inconsistent(!spotState->expsharp); - sharradius->setEditedState(spotState->sharradius ? Edited : UnEdited); - sharamount->setEditedState(spotState->sharamount ? Edited : UnEdited); - shardamping->setEditedState(spotState->shardamping ? Edited : UnEdited); - shariter->setEditedState(spotState->shariter ? Edited : UnEdited); - sensisha->setEditedState(spotState->sensisha ? Edited : UnEdited); - inverssha->set_inconsistent(multiImage && !spotState->inverssha); - - // Contrast by detail levels - expcbdl->set_inconsistent(!spotState->expcbdl); - - for (int i = 0; i < 5; i++) { - multiplier[i]->setEditedState(spotState->mult[i] ? Edited : UnEdited); - } - - chromacbdl->setEditedState(spotState->chromacbdl ? Edited : UnEdited); - threshold->setEditedState(spotState->threshold ? Edited : UnEdited); - sensicb->setEditedState(spotState->sensicb ? Edited : UnEdited); - - // Denoise - expdenoi->set_inconsistent(!spotState->expdenoi); - noiselumf->setEditedState(spotState->noiselumf ? Edited : UnEdited); - noiselumc->setEditedState(spotState->noiselumc ? Edited : UnEdited); - noiselumdetail->setEditedState(spotState->noiselumdetail ? Edited : UnEdited); - noiselequal->setEditedState(spotState->noiselequal ? Edited : UnEdited); - noisechrof->setEditedState(spotState->noisechrof ? Edited : UnEdited); - noisechroc->setEditedState(spotState->noisechroc ? Edited : UnEdited); - noisechrodetail->setEditedState(spotState->noisechrodetail ? Edited : UnEdited); - adjblur->setEditedState(spotState->adjblur ? Edited : UnEdited); - bilateral->setEditedState(spotState->bilateral ? Edited : UnEdited); - sensiden->setEditedState(spotState->sensiden ? Edited : UnEdited); - - // Others - avoid->set_inconsistent(multiImage && !spotState->avoid); - } - } - */ - setEnabled(pp->locallab.enabled); if (pedited) { @@ -1049,7 +893,7 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited) void Locallab::write(ProcParams* pp, ParamsEdited* pedited) { - printf("Locallab write\n"); + // printf("Locallab write\n"); pp->locallab.enabled = getEnabled(); @@ -1200,8 +1044,6 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) } } - printf("size after deletion %d\n", (int)pp->locallab.spots.size()); - break; } } @@ -1751,7 +1593,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) void Locallab::protectskins_toggled() { - printf("protectskins_toggled\n"); + // printf("protectskins_toggled\n"); if (multiImage) { if (protectSkins->get_inconsistent()) { @@ -1775,7 +1617,7 @@ void Locallab::protectskins_toggled() void Locallab::avoidcolorshift_toggled() { - printf("avoidcolorshift_toggled\n"); + // printf("avoidcolorshift_toggled\n"); if (multiImage) { if (avoidColorShift->get_inconsistent()) { @@ -1799,7 +1641,7 @@ void Locallab::avoidcolorshift_toggled() void Locallab::pastsattog_toggled() { - printf("pastsattog_toggled\n"); + // printf("pastsattog_toggled\n"); if (multiImage) { if (pastSatTog->get_inconsistent()) { @@ -1892,24 +1734,11 @@ void Locallab::curveChanged(CurveEditor* ce) } } } - - /* - if (ce == skinTonesCurve) { - listener->panelChanged(EvlocallabSkinTonesCurve, M("HISTORY_CUSTOMCURVE")); - int strval = retrab->getValue(); - //update MIP - retrab->setValue(strval + 1); - adjusterChanged(retrab, strval + 1); - usleep(10000); //to test - retrab->setValue(strval); - adjusterChanged(retrab, strval); - } - */ } void Locallab::retinexMethodChanged() { - printf("retinexMethodChanged\n"); + // printf("retinexMethodChanged\n"); if (getEnabled() && expreti->getEnabled()) { if (listener) { @@ -1920,7 +1749,7 @@ void Locallab::retinexMethodChanged() void Locallab::blurMethodChanged() { - printf("blurMethodChanged\n"); + // printf("blurMethodChanged\n"); // Update Blur & Noise GUI according to blurMethod combobox (to be compliant with updateSpecificGUIState function) if (multiImage && blurMethod->get_active_text() == M("GENERAL_UNCHANGED")) { @@ -1940,7 +1769,7 @@ void Locallab::blurMethodChanged() void Locallab::qualitycurveMethodChanged() { - printf("qualitycurveMethodChanged\n"); + // printf("qualitycurveMethodChanged\n"); if (getEnabled() && expcolor->getEnabled()) { if (listener) { @@ -1951,7 +1780,7 @@ void Locallab::qualitycurveMethodChanged() void Locallab::inversChanged() { - printf("inversChanged\n"); + // printf("inversChanged\n"); if (multiImage) { if (invers->get_inconsistent()) { @@ -1996,7 +1825,7 @@ void Locallab::inversChanged() void Locallab::curvactivChanged() { - printf("curvactivChanged\n"); + // printf("curvactivChanged\n"); if (multiImage) { if (curvactiv->get_inconsistent()) { @@ -2020,7 +1849,7 @@ void Locallab::curvactivChanged() void Locallab::activlumChanged() { - printf("activlumChanged\n"); + // printf("activlumChanged\n"); if (multiImage) { if (activlum->get_inconsistent()) { @@ -2044,7 +1873,7 @@ void Locallab::activlumChanged() void Locallab::inversshaChanged() { - printf("inversshaChanged\n"); + // printf("inversshaChanged\n"); if (multiImage) { if (inverssha->get_inconsistent()) { @@ -2077,7 +1906,7 @@ void Locallab::inversshaChanged() void Locallab::inversretChanged() { - printf("inversretChanged\n"); + // printf("inversretChanged\n"); if (multiImage) { if (inversret->get_inconsistent()) { @@ -2108,85 +1937,9 @@ void Locallab::inversretChanged() } } -/* -void Locallab::updateDefaultsValues(const rtengine::procparams::ProcParams* defParams, int id) -{ - const LocallabParams::LocallabSpot* defSpot = new LocallabParams::LocallabSpot(); - - for (int i = 0; i < (int)defParams->locallab.spots.size(); i++) { - if (defParams->locallab.spots.at(i).id == id) { - defSpot = &defParams->locallab.spots.at(i); - - break; - } - } - - // Set default values for adjusters and threshold adjusters - // Color & Light - lightness->setDefault((double)defSpot->lightness); - contrast->setDefault((double)defSpot->contrast); - chroma->setDefault((double)defSpot->chroma); - sensi->setDefault((double)defSpot->sensi); - // Exposure - expcomp->setDefault((double)defSpot->expcomp); - hlcompr->setDefault((double)defSpot->hlcompr); - hlcomprthresh->setDefault((double)defSpot->hlcomprthresh); - black->setDefault((double)defSpot->black); - shcompr->setDefault((double)defSpot->shcompr); - warm->setDefault((double)defSpot->warm); - sensiex->setDefault((double)defSpot->sensiex); - // Vibrance - saturated->setDefault((double)defSpot->saturated); - pastels->setDefault((double)defSpot->pastels); - psThreshold->setDefault(defSpot->psthreshold); - sensiv->setDefault((double)defSpot->sensiv); - // Blur & Noise - radius->setDefault((double)defSpot->radius); - strength->setDefault((double)defSpot->strength); - sensibn->setDefault((double)defSpot->sensibn); - // Tone Mapping - stren->setDefault((double)defSpot->stren); - gamma->setDefault((double)defSpot->gamma); - estop->setDefault((double)defSpot->estop); - scaltm->setDefault((double)defSpot->scaltm); - rewei->setDefault((double)defSpot->rewei); - sensitm->setDefault((double)defSpot->sensitm); - // Retinex - str->setDefault((double)defSpot->str); - chrrt->setDefault((double)defSpot->chrrt); - neigh->setDefault((double)defSpot->neigh); - vart->setDefault((double)defSpot->vart); - sensih->setDefault((double)defSpot->sensih); - // Sharpening - sharradius->setDefault((double)defSpot->sharradius); - sharamount->setDefault((double)defSpot->sharamount); - shardamping->setDefault((double)defSpot->shardamping); - shariter->setDefault((double)defSpot->shariter); - sensisha->setDefault((double)defSpot->sensisha); - // Contrast by detail levels - for (int i = 0; i < 5; i++) { - multiplier[i]->setDefault(defSpot->mult[i]); - } - chromacbdl->setDefault((double)defSpot->chromacbdl); - threshold->setDefault(defSpot->threshold); - sensicb->setDefault((double)defSpot->sensicb); - // Denoise - noiselumf->setDefault((double)defSpot->noiselumf); - noiselumc->setDefault((double)defSpot->noiselumc); - noiselumdetail->setDefault((double)defSpot->noiselumdetail); - noiselequal->setDefault((double)defSpot->noiselequal); - noisechrof->setDefault((double)defSpot->noisechrof); - noisechroc->setDefault((double)defSpot->noisechroc); - noisechrodetail->setDefault((double)defSpot->noisechrodetail); - adjblur->setDefault((double)defSpot->adjblur); - bilateral->setDefault((double)defSpot->bilateral); - sensiden->setDefault((double)defSpot->sensiden); -} -*/ - void Locallab::setParamEditable(bool cond) { - printf("setParamEditable: %d\n", cond); + // printf("setParamEditable: %d\n", cond); // Update params editable state for controlspotpanel expsettings->setParamEditable(cond); @@ -2227,8 +1980,7 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams* defParams, co void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pedited, int id) { - printf("setDefaults\n"); - printf("defparams: %p\n", defparams); + // printf("setDefaults\n"); // Set default values and edited states for controlspotpanel expsettings->setDefaults(defParams, pedited, id); @@ -2443,7 +2195,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe void Locallab::adjusterChanged(ThresholdAdjuster* a, int newBottom, int newTop) { - printf("adjusterChangedTS\n"); + // printf("adjusterChangedTS\n"); if (getEnabled() && expvibrance->getEnabled()) { if (listener) { @@ -2454,7 +2206,7 @@ void Locallab::adjusterChanged(ThresholdAdjuster* a, int newBottom, int newTop) void Locallab::adjusterChanged(Adjuster * a, double newval) { - printf("adjusterChanged\n"); + // printf("adjusterChanged\n"); // Color & Light if (getEnabled() && expcolor->getEnabled()) { @@ -2800,7 +2552,7 @@ void Locallab::enabledChanged() void Locallab::avoidChanged() { - printf("avoidChanged\n"); + // printf("avoidChanged\n"); if (multiImage) { if (avoid->get_inconsistent()) { @@ -2822,81 +2574,14 @@ void Locallab::avoidChanged() } } -// TODO void Locallab::trimValues(rtengine::procparams::ProcParams * pp) { - /* - degree->trimValue(pp->locallab.degree); - locY->trimValue(pp->locallab.locY); - locX->trimValue(pp->locallab.locX); - locYT->trimValue(pp->locallab.locYT); - locXL->trimValue(pp->locallab.locXL); - centerX->trimValue(pp->locallab.centerX); - centerY->trimValue(pp->locallab.centerY); - circrad->trimValue(pp->locallab.circrad); - adjblur->trimValue(pp->locallab.adjblur); - thres->trimValue(pp->locallab.thres); - proxi->trimValue(pp->locallab.proxi); - lightness->trimValue(pp->locallab.lightness); - contrast->trimValue(pp->locallab.contrast); - chroma->trimValue(pp->locallab.chroma); - warm->trimValue(pp->locallab.warm); - expcomp->trimValue(pp->locallab.expcomp); - hlcompr->trimValue(pp->locallab.hlcompr); - hlcomprthresh->trimValue(pp->locallab.hlcomprthresh); - black->trimValue(pp->locallab.black); - shcompr->trimValue(pp->locallab.shcompr); - noiselumf->trimValue(pp->locallab.noiselumf); - noiselumc->trimValue(pp->locallab.noiselumc); - noiselumdetail->trimValue(pp->locallab.noiselumdetail); - noiselequal->trimValue(pp->locallab.noiselequal); - noisechrodetail->trimValue(pp->locallab.noisechrodetail); - bilateral->trimValue(pp->locallab.bilateral); - sensiden->trimValue(pp->locallab.sensiden); - noisechrof->trimValue(pp->locallab.noisechrof); - noisechroc->trimValue(pp->locallab.noisechroc); - sharradius->trimValue(pp->locallab.sharradius); - sharamount->trimValue(pp->locallab.sharamount); - shardamping->trimValue(pp->locallab.shardamping); - shariter->trimValue(pp->locallab.shariter); - sensisha->trimValue(pp->locallab.sensisha); - sensi->trimValue(pp->locallab.sensi); - sensiex->trimValue(pp->locallab.sensiex); - sensih->trimValue(pp->locallab.sensih); - sensiexclu->trimValue(pp->locallab.sensiexclu); - struc->trimValue(pp->locallab.struc); - sensicb->trimValue(pp->locallab.sensicb); - sensibn->trimValue(pp->locallab.sensibn); - sensitm->trimValue(pp->locallab.sensitm); - radius->trimValue(pp->locallab.radius); - strength->trimValue(pp->locallab.strength); - stren->trimValue(pp->locallab.stren); - gamma->trimValue(pp->locallab.gamma); - estop->trimValue(pp->locallab.estop); - scaltm->trimValue(pp->locallab.scaltm); - rewei->trimValue(pp->locallab.rewei); - transit->trimValue(pp->locallab.transit); - str->trimValue(pp->locallab.str); - neigh->trimValue(pp->locallab.neigh); - vart->trimValue(pp->locallab.vart); - chrrt->trimValue(pp->locallab.chrrt); - - for (int i = 0; i < 5; i++) { - multiplier[i]->trimValue(pp->locallab.mult[i]); - } - - chromacbdl->trimValue(pp->locallab.chromacbdl); - - threshold->trimValue(pp->locallab.threshold); - pastels->trimValue(pp->locallab.pastels); - saturated->trimValue(pp->locallab.saturated); - sensiv->trimValue(pp->locallab.sensiv); - */ + // TODO } void Locallab::setBatchMode(bool batchMode) { - printf("BatchMode : %d\n", batchMode); + // printf("BatchMode : %d\n", batchMode); ToolPanel::setBatchMode(batchMode); @@ -3023,9 +2708,6 @@ std::vector Locallab::getCurvePoints(ThresholdSelector* tAdjuster) const return points; } - - - void Locallab::setEditProvider(EditDataProvider * provider) { expsettings->setEditProvider(provider); @@ -3091,7 +2773,7 @@ void Locallab::setListener(ToolPanelListener* tpl) void Locallab::enableListener() { - printf("enableListener\n"); + // printf("enableListener\n"); FoldableToolPanel::enableListener(); // Color & Light @@ -3128,7 +2810,7 @@ void Locallab::enableListener() void Locallab::disableListener() { - printf("disableListener\n"); + // printf("disableListener\n"); FoldableToolPanel::disableListener(); // Color & Light @@ -3165,7 +2847,7 @@ void Locallab::disableListener() void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited, int index) { - printf("updateLocallabGUI\n"); + // printf("updateLocallabGUI\n"); // Update GUI values if (index < pp->locallab.nbspot && index < (int)pp->locallab.spots.size()) { @@ -3518,7 +3200,7 @@ void Locallab::updateSpecificGUIState() void Locallab::autoOpenCurve() { - printf("autoOpenCurve\n"); + // printf("autoOpenCurve\n"); // TODO autoOpenCurve only considers linearity state of selected spot curve llshape->openIfNonlinear(); diff --git a/rtgui/locallab.h b/rtgui/locallab.h index bc8cec9cd..f582d4577 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -229,7 +229,6 @@ private: // Locallab GUI management function void updateLocallabGUI(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited, int index); void updateSpecificGUIState(); - // void updateDefaultsValues(const rtengine::procparams::ProcParams* defParams, int id = 0); void setParamEditable(bool cond); public: diff --git a/rtgui/thumbnail.cc b/rtgui/thumbnail.cc index caa12a5e9..ebe8fedcd 100644 --- a/rtgui/thumbnail.cc +++ b/rtgui/thumbnail.cc @@ -452,12 +452,9 @@ void Thumbnail::setProcParams (const ProcParams& pp, ParamsEdited* pe, int whoCh || pparams.softlight != pp.softlight; { - printf("setProcParams: %d\n", needsReprocessing); - MyMutex::MyLock lock(mutex); if (pparams != pp) { - printf("recentlySaved\n"); cfs.recentlySaved = false; } else if (pparamsValid && !updateCacheNow) { // nothing to do @@ -470,10 +467,8 @@ void Thumbnail::setProcParams (const ProcParams& pp, ParamsEdited* pe, int whoCh const int inTrash = getStage(); if (pe) { - printf("size: %d %d %d\n", (int)pe->locallab.spots.size(), pe->locallab.nbspot, pe->locallab.selspot); pe->combine(pparams, pp, true); } else { - printf("size: %d\n", (int)pp.locallab.spots.size()); pparams = pp; } diff --git a/rtgui/toolpanelcoord.cc b/rtgui/toolpanelcoord.cc index 06dc80d79..3b7863131 100644 --- a/rtgui/toolpanelcoord.cc +++ b/rtgui/toolpanelcoord.cc @@ -374,10 +374,6 @@ void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtr void ToolPanelCoordinator::panelChanged(rtengine::ProcEvent event, const Glib::ustring& descr) { - // TODO Locallab printf - printf("panelChanged\n"); - printf("panelChanged event: %d\n", (int)event); - if (!ipc) { return; } @@ -390,8 +386,6 @@ void ToolPanelCoordinator::panelChanged(rtengine::ProcEvent event, const Glib::u toolPanel->write(params); } - printf("nbspot#1 %d %d\n", params->locallab.nbspot, (int)params->locallab.spots.size()); - // Compensate rotation on flip if (event == rtengine::EvCTHFlip || event == rtengine::EvCTVFlip) { if (fabs(params->rotate.degree) > 0.001) { @@ -463,16 +457,10 @@ void ToolPanelCoordinator::panelChanged(rtengine::ProcEvent event, const Glib::u } photoLoadedOnce = true; - - printf("nbspot#2 %d %d\n", params->locallab.nbspot, (int)params->locallab.spots.size()); } void ToolPanelCoordinator::profileChange(const PartialProfile *nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited, bool fromLastSave) { - // TODO Locallab printf - printf("profileChanged\n"); - printf("profileChanged event: %d\n", (int)event); - int fw, fh, tr; if (!ipc) { @@ -482,12 +470,6 @@ void ToolPanelCoordinator::profileChange(const PartialProfile *nparams, rtengine ProcParams *params = ipc->beginUpdateParams(); ProcParams *mergedParams = new ProcParams(); - printf("profileChanged 1\n"); - printf("nbspot: %d\n", params->locallab.nbspot); - for (size_t i = 0; i < params->locallab.spots.size(); i++) { - printf("id_%d = %d\n", (int)i, params->locallab.spots.at(i).id); - } - // Copy the current params as default values for the fusion *mergedParams = *params; @@ -516,12 +498,6 @@ void ToolPanelCoordinator::profileChange(const PartialProfile *nparams, rtengine *params = *mergedParams; delete mergedParams; - printf("profileChanged 2\n"); - printf("nbspot: %d\n", params->locallab.nbspot); - for (size_t i = 0; i < params->locallab.spots.size(); i++) { - printf("id_%d = %d\n", (int)i, params->locallab.spots.at(i).id); - } - tr = TR_NONE; if (params->coarse.rotate == 90) {