diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc index e7cf2b4c2..df043c86f 100644 --- a/rtengine/imagedata.cc +++ b/rtengine/imagedata.cc @@ -287,6 +287,10 @@ FramesData::FramesData(const Glib::ustring &fname) : expcomp = pos->toFloat(); } + if (find_exif_tag("Exif.Image.Rating")) { + rating = pos->toLong(); + } + // ----------------------- // Special file type detection (HDR, PixelShift) // ------------------------ @@ -567,12 +571,6 @@ std::string FramesData::getOrientation() const } -int FramesData::getRating() const -{ - return rating; -} - - void FramesData::setDCRawFrameCount(unsigned int frameCount) { dcrawFrameCount = frameCount; @@ -589,6 +587,12 @@ Glib::ustring FramesData::getFileName() const return fname_; } + +int FramesData::getRating() const +{ + return rating; +} + //------inherited functions--------------// std::string FramesMetaData::apertureToString(double aperture) diff --git a/rtengine/imagedata.h b/rtengine/imagedata.h index b1a29dc39..306c3b6f9 100644 --- a/rtengine/imagedata.h +++ b/rtengine/imagedata.h @@ -81,8 +81,8 @@ public: std::string getLens() const override; std::string getSerialNumber() const; std::string getOrientation() const override; - int getRating() const override; Glib::ustring getFileName() const override; + int getRating() const override; }; } diff --git a/rtengine/rtengine.h b/rtengine/rtengine.h index ceb27a504..91ef0a436 100644 --- a/rtengine/rtengine.h +++ b/rtengine/rtengine.h @@ -1,4 +1,5 @@ -/* +/* -*- C++ -*- + * * This file is part of RawTherapee. * * Copyright (c) 2004-2010 Gabor Horvath @@ -122,7 +123,7 @@ public: /** @return the orientation of the image */ virtual std::string getOrientation() const = 0; /** @return the rating of the image */ - virtual int getRating () const = 0; + virtual int getRating() const = 0; /** @return true if the file is a PixelShift shot (Pentax and Sony bodies) */ virtual bool getPixelShift () const = 0; diff --git a/rtgui/thumbnail.cc b/rtgui/thumbnail.cc index 31ca8bc1f..32f80a193 100644 --- a/rtgui/thumbnail.cc +++ b/rtgui/thumbnail.cc @@ -387,7 +387,7 @@ void Thumbnail::notifylisterners_procParamsChanged(int whoChangedIt) * The result is a complete ProcParams with default values merged with the values * from the loaded ProcParams (sidecar or cache file). */ -void Thumbnail::loadProcParams () +void Thumbnail::loadProcParams() { MyMutex::MyLock lock(mutex);