LazUtils: when updating existing translation item, copy PreviousID together with translation if needed, just like we do for newly added item.

git-svn-id: trunk@57010 -
This commit is contained in:
maxim 2018-01-08 15:22:52 +00:00
parent 2c0b33fd1a
commit 854d1eceaf

View File

@ -1682,6 +1682,9 @@ begin
Item.Context := Item.IdentifierLow;
Item.Translation := ItemTmp.Translation;
Item.ModifyFlag(sFuzzyFlag, true);
// if old item is fuzzy, copy PreviousID too
if pos(sFuzzyFlag, ItemTmp.Flags)<>0 then
Item.PreviousID := ItemTmp.PreviousID;
FModified := True;
end;
end;
@ -1699,7 +1702,7 @@ begin
APrevStr := '';
Item := TPOFileItem(FOriginalToItem.Data[Original]);
if Item<>nil then begin
// old item don't have context, add one
// old item doesn't have context, add one
if Item.Context='' then
Item.Context := Item.IdentifierLow;