Various bugfix (see #4008) :
1. RT could crash in some circumstances with single frame image 2. UNICODE UserComment now done when already existing in raw file 3. When editing UserComment in the ExifPanel, the Value filed is now filled with the current value
This commit is contained in:
@@ -730,7 +730,12 @@ void TagDirectory::applyChange (std::string name, Glib::ustring value)
|
||||
} else if (value == "#delete" && t) {
|
||||
t->setKeep (false);
|
||||
} else if (t && !t->isDirectory()) {
|
||||
t->valueFromString (value);
|
||||
if (name == "UserComment") {
|
||||
// UserComment can be Unicode
|
||||
t->userCommentFromString (value);
|
||||
} else {
|
||||
t->valueFromString (value);
|
||||
}
|
||||
} else {
|
||||
const TagAttrib* attrib = nullptr;
|
||||
|
||||
@@ -1752,6 +1757,19 @@ void Tag::valueFromString (const std::string& value)
|
||||
}
|
||||
}
|
||||
|
||||
void Tag::userCommentFromString (const Glib::ustring& text)
|
||||
{
|
||||
|
||||
if (!allocOwnMemory) {
|
||||
return;
|
||||
}
|
||||
if (value) {
|
||||
delete [] value;
|
||||
value = nullptr;
|
||||
}
|
||||
initUserComment(text);
|
||||
}
|
||||
|
||||
int Tag::calculateSize ()
|
||||
{
|
||||
int size = 0;
|
||||
|
Reference in New Issue
Block a user