aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/Geocache.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/Geocache.java')
-rw-r--r--main/src/cgeo/geocaching/Geocache.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/Geocache.java b/main/src/cgeo/geocaching/Geocache.java
index 1972c7a..00f1a1f 100644
--- a/main/src/cgeo/geocaching/Geocache.java
+++ b/main/src/cgeo/geocaching/Geocache.java
@@ -280,8 +280,14 @@ public class Geocache implements ICache, IWaypoint {
if (elevation == null) {
elevation = other.elevation;
}
- if (personalNote == null) { // don't use StringUtils.isBlank here. Otherwise we cannot recognize a note which was deleted on GC
+ // don't use StringUtils.isBlank here. Otherwise we cannot recognize a note which was deleted on GC
+ if (personalNote == null) {
personalNote = other.personalNote;
+ } else if (other.personalNote != null && !personalNote.equals(other.personalNote)) {
+ final PersonalNote myNote = new PersonalNote(this);
+ final PersonalNote otherNote = new PersonalNote(other);
+ final PersonalNote mergedNote = myNote.mergeWith(otherNote);
+ personalNote = mergedNote.toString();
}
if (StringUtils.isBlank(getShortDescription())) {
shortdesc = other.getShortDescription();