Beispiel #1
0
 @Override
 public void visit(Relation r) {
   if (left.matches(e.withPrimitive(r))) {
     final List<Node> openEnds =
         MultipolygonCache.getInstance().get(Main.map.mapView, r).getOpenEnds();
     final int openEndIndex = openEnds.indexOf(e.osm);
     if (openEndIndex >= 0) {
       e.parent = r;
       e.index = openEndIndex;
       e.count = openEnds.size();
     }
   }
 }
Beispiel #2
0
 public void destroy() {
   Main.pref.removePreferenceChangeListener(this);
   DataSet.removeSelectionListener(repaintSelectionChangedListener);
   MultipolygonCache.getInstance().clear(this);
   if (mapMover != null) {
     mapMover.destroy();
   }
   layerLock.writeLock().lock();
   try {
     activeLayer = null;
     changedLayer = null;
     editLayer = null;
     layers.clear();
   } finally {
     layerLock.writeLock().unlock();
   }
   nonChangedLayers.clear();
   synchronized (temporaryLayers) {
     temporaryLayers.clear();
   }
 }