예제 #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();
     }
   }
 }
예제 #2
0
파일: MapView.java 프로젝트: H-Theking/josm
 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();
   }
 }