Improve batch mode with Locallab

Batch mode is now correctly managed by Locallab. It works only if the
pictures have the same control spot number with coherent id

Other improvements:
- If there is no control spot, all Locallab tools are now disabled
This commit is contained in:
Pandagrapher
2018-12-26 10:31:57 +01:00
parent 23b0836603
commit 39c53119eb
16 changed files with 2190 additions and 1394 deletions

View File

@@ -182,8 +182,16 @@ void History::historySelectionChanged ()
if (row && tpc) {
ProcParams pparams = row[historyColumns.params];
ParamsEdited pe (true);
pe.locallab.spots.resize(pparams.locallab.nbspot, new LocallabParamsEdited::LocallabSpotEdited(true));
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], &paramsEdited);
}
@@ -215,6 +223,7 @@ void History::bookmarkSelectionChanged ()
if (row && tpc) {
ProcParams pparams = row[bookmarkColumns.params];
ParamsEdited pe (true);
pe.locallab.spots.resize(pparams.locallab.nbspot, new LocallabParamsEdited::LocallabSpotEdited(true));
PartialProfile pp (&pparams, &pe);
ParamsEdited paramsEdited = row[bookmarkColumns.paramsEdited];
tpc->profileChange (&pp, EvBookmarkSelected, row[bookmarkColumns.text], &paramsEdited);