Fix update notice for area markers - missing description

This commit is contained in:
Mike Primm 2011-11-20 13:08:04 +08:00 committed by mikeprimm
parent f6a93634fa
commit e986ab4bfb
2 changed files with 15 additions and 0 deletions

View File

@ -272,6 +272,19 @@ class AreaMarkerImpl implements AreaMarker {
}
@Override
public void setCornerLocations(double[] x, double[] z) {
/* Check if equals */
if(x.length == corners.size()) {
boolean match = true;
for(int i = 0; i < x.length; i++) {
Coord c = corners.get(i);
if((c.x != x[i]) || (c.z != z[i])) {
match = false;
break;
}
}
if(match)
return;
}
corners.clear();
for(int i = 0; (i < x.length) && (i < z.length); i++) {
corners.add(new Coord(x[i], z[i]));

View File

@ -107,6 +107,7 @@ public class MarkerAPIImpl implements MarkerAPI, Event.Listener<DynmapWorld> {
public String id;
public String label;
public String set;
public String desc;
public AreaMarkerUpdated(AreaMarker m, boolean deleted) {
this.id = m.getMarkerID();
@ -125,6 +126,7 @@ public class MarkerAPIImpl implements MarkerAPI, Event.Listener<DynmapWorld> {
opacity = m.getLineOpacity();
fillcolor = String.format("#%06X", m.getFillColor());
fillopacity = m.getFillOpacity();
desc = m.getDescription();
this.set = m.getMarkerSet().getMarkerSetID();
if(deleted)