merge with dev

This commit is contained in:
Desmis
2019-12-17 14:08:57 +01:00
6 changed files with 147 additions and 60 deletions

View File

@@ -230,22 +230,7 @@ void Adjuster::setDefaultEditedState (EditedState eState)
void Adjuster::autoToggled ()
{
if (!editedCheckBox) {
// If not used in the BatchEditor panel
if (automatic->get_active()) {
// Disable the slider and spin button
spin->set_sensitive(false);
slider->set_sensitive(false);
reset->set_sensitive(false);
} else {
// Enable the slider and spin button
spin->set_sensitive(true);
slider->set_sensitive(true);
reset->set_sensitive(true);
}
}
if (adjusterListener != nullptr && !blocked) {
if (adjusterListener && !blocked) {
adjusterListener->adjusterAutoToggled(this);
}
}
@@ -380,6 +365,9 @@ void Adjuster::spinChanged ()
if (adjusterListener && !blocked) {
if (!buttonReleaseSlider.connected() || afterReset) {
eventPending = false;
if (automatic) {
setAutoValue(false);
}
adjusterListener->adjusterChanged(this, spin->get_value());
} else {
eventPending = true;
@@ -419,6 +407,9 @@ void Adjuster::sliderChanged ()
if (adjusterListener && !blocked) {
if (!buttonReleaseSlider.connected() || afterReset) {
eventPending = false;
if (automatic) {
setAutoValue(false);
}
adjusterListener->adjusterChanged(this, spin->get_value());
} else {
eventPending = true;
@@ -459,21 +450,6 @@ void Adjuster::setAutoValue (bool a)
const bool oldVal = autoChange.block(true);
automatic->set_active(a);
autoChange.block(oldVal);
if (!editedCheckBox) {
// If not used in the BatchEditor panel
if (a) {
// Disable the slider and spin button
spin->set_sensitive(false);
slider->set_sensitive(false);
reset->set_sensitive(false);
} else {
// Enable the slider and spin button
spin->set_sensitive(true);
slider->set_sensitive(true);
reset->set_sensitive(true);
}
}
}
}
@@ -481,6 +457,9 @@ bool Adjuster::notifyListener ()
{
if (eventPending && adjusterListener != nullptr && !blocked) {
if (automatic) {
setAutoValue(false);
}
adjusterListener->adjusterChanged(this, spin->get_value());
}
@@ -571,6 +550,9 @@ void Adjuster::showEditedCB ()
void Adjuster::editedToggled ()
{
if (adjusterListener && !blocked) {
if (automatic) {
setAutoValue(false);
}
adjusterListener->adjusterChanged(this, spin->get_value());
}

View File

@@ -2073,6 +2073,7 @@ bool EditorPanel::idle_sentToGimp (ProgressConnector<int> *pc, rtengine::IImagef
{
img->free ();
int errore = pc->returnValue();
setProgressState(false);
delete pc;
if (!errore) {

View File

@@ -342,34 +342,31 @@ void Thumbnail::notifylisterners_procParamsChanged(int whoChangedIt)
* the Preferences).
*
* The result is a complete ProcParams with default values merged with the values
* from the default Raw or Image ProcParams, then with the values from the loaded
* ProcParams (sidecar or cache file).
*/
* from the loaded ProcParams (sidecar or cache file).
*/
void Thumbnail::loadProcParams ()
{
MyMutex::MyLock lock(mutex);
pparamsValid = false;
pparams->setDefaults();
const PartialProfile *defaultPP = ProfileStore::getInstance()->getDefaultPartialProfile(getType() == FT_Raw);
defaultPP->applyTo(pparams.get());
if (options.paramsLoadLocation == PLL_Input) {
// try to load it from params file next to the image file
int ppres = pparams->load (fname + paramFileExtension);
const int ppres = pparams->load(fname + paramFileExtension);
pparamsValid = !ppres && pparams->ppVersion >= 220;
// if no success, try to load the cached version of the procparams
if (!pparamsValid) {
pparamsValid = !pparams->load (getCacheFileName ("profiles", paramFileExtension));
pparamsValid = !pparams->load(getCacheFileName("profiles", paramFileExtension));
}
} else {
// try to load it from cache
pparamsValid = !pparams->load (getCacheFileName ("profiles", paramFileExtension));
pparamsValid = !pparams->load(getCacheFileName("profiles", paramFileExtension));
// if no success, try to load it from params file next to the image file
if (!pparamsValid) {
int ppres = pparams->load (fname + paramFileExtension);
const int ppres = pparams->load(fname + paramFileExtension);
pparamsValid = !ppres && pparams->ppVersion >= 220;
}
}