merge with dev
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user