merge with dev

This commit is contained in:
Desmis
2019-07-18 13:41:26 +02:00
52 changed files with 1853 additions and 463 deletions

View File

@@ -815,6 +815,7 @@ int Thumbnail::infoFromImage (const Glib::ustring& fname, std::unique_ptr<rtengi
cfs.lens = idata->getLens();
cfs.camMake = idata->getMake();
cfs.camModel = idata->getModel();
cfs.rating = idata->getRating();
if (idata->getOrientation() == "Rotate 90 CW") {
deg = 90;
@@ -1007,15 +1008,22 @@ void Thumbnail::setFileName (const Glib::ustring &fn)
int Thumbnail::getRank () const
{
return pparams->rank;
// prefer the user-set rank over the embedded Rating
// pparams->rank == -1 means that there is no saved rank yet, so we should
// next look for the embedded Rating metadata.
if (pparams->rank != -1) {
return pparams->rank;
} else {
return cfs.rating;
}
}
void Thumbnail::setRank (int rank)
{
if (pparams->rank != rank) {
pparams->rank = rank;
pparamsValid = true;
}
pparamsValid = true;
}
int Thumbnail::getColorLabel () const