diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2014-04-26 10:56:29 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-04-26 17:24:12 -0700 |
commit | cd98e4f6dbe0a9d8731bfd5c7bf506ae73f07877 (patch) | |
tree | d7c9459aef36e72bd06f213cdd1138fdc2db0da6 /qt-ui | |
parent | 28f4e9b10e04cd5429dd62d0274d6263ebaa4d04 (diff) | |
download | subsurface-cd98e4f6dbe0a9d8731bfd5c7bf506ae73f07877.tar.gz |
Use original time if available on image loading
DateTimeOriginal should be used as first option when loading images.
When images are modified, the original time should be retained, but the
DateTime will change to the edit time.
See #495
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/simplewidgets.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp index e6720509f..7335f9aa0 100644 --- a/qt-ui/simplewidgets.cpp +++ b/qt-ui/simplewidgets.cpp @@ -240,9 +240,9 @@ time_t ShiftImageTimesDialog::epochFromExiv(EXIFInfo *exif) int year, month, day, hour, min, sec; if (strlen(exif->DateTime.c_str())) - sscanf(exif->DateTime.c_str(), "%d:%d:%d %d:%d:%d", &year, &month, &day, &hour, &min, &sec); - else sscanf(exif->DateTimeOriginal.c_str(), "%d:%d:%d %d:%d:%d", &year, &month, &day, &hour, &min, &sec); + else + sscanf(exif->DateTime.c_str(), "%d:%d:%d %d:%d:%d", &year, &month, &day, &hour, &min, &sec); tm.tm_year = year; tm.tm_mon = month - 1; tm.tm_mday = day; |