Fix issue where selected spot was not saved correctly right after

deleting spot
This commit is contained in:
Pandagrapher 2020-04-23 20:53:59 +02:00
parent a368b5470b
commit de2f66ae76

View File

@ -555,8 +555,8 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
// Select the first remaining spot before deleted one
if (pp->locallab.spots.size() > 0) {
for (int j = i - 1; j >= 0; j--) { // procparams spots uses zero-based index whereas spot ids use one-based index
if (expsettings->setSelectedSpot(j + 1)) { // True if an existing spot has been selected on controlspotpanel
for (int j = i - 1; j >= 0; j--) {
if (expsettings->setSelectedSpot(j)) { // True if an existing spot has been selected on controlspotpanel
pp->locallab.selspot = j;
break;