Changeset 28610 in osm for applications/editors/josm/plugins/junctionchecking
- Timestamp:
- 2012-08-24T01:11:59+02:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckerMapMode.java
r25501 r28610 138 138 */ 139 139 private void paintRect(Point p1, Point p2) { 140 Graphics g = frame.getGraphics();//Main.map.mapView.getGraphics(); 141 142 Rectangle r = oldRect; 143 if (r != null) { 144 //overwrite old rct 140 if (frame != null) { 141 Graphics g = frame.getGraphics(); 142 143 Rectangle r = oldRect; 144 if (r != null) { 145 //overwrite old rct 146 g.setXORMode(Color.BLACK); 147 g.setColor(Color.WHITE); 148 g.drawRect(r.x,r.y,r.width,r.height); 149 } 150 145 151 g.setXORMode(Color.BLACK); 146 152 g.setColor(Color.WHITE); 153 r = createRect(p1,p2); 147 154 g.drawRect(r.x,r.y,r.width,r.height); 155 oldRect = r; 148 156 } 149 150 g.setXORMode(Color.BLACK);151 g.setColor(Color.WHITE);152 r = createRect(p1,p2);153 g.drawRect(r.x,r.y,r.width,r.height);154 oldRect = r;155 157 } 156 158 … … 162 164 this.digraph = digraph; 163 165 } 166 167 @Override 168 public void destroy() { 169 super.destroy(); 170 MapView.removeLayerChangeListener(this); 171 } 164 172 } -
applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckerPlugin.java
r25501 r28610 49 49 @Override 50 50 public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) { 51 jcMapMode.setFrame(newFrame); 51 52 if (newFrame != null) { 52 53 junctionCheckDialog = new JunctionCheckDialog(this); 53 54 newFrame.addToggleDialog(junctionCheckDialog); 54 55 MapView.addLayerChangeListener(this); 55 jcMapMode.setFrame(newFrame);56 56 } else 57 57 MapView.removeLayerChangeListener(this);
Note:
See TracChangeset
for help on using the changeset viewer.