Changeset 28612 in osm for applications/editors/josm/plugins/editgpx/src
- Timestamp:
- 2012-08-24T01:20:13+02:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/EditGpxMode.java
r23189 r28612 128 128 */ 129 129 private void paintRect(Point p1, Point p2) { 130 Graphics g = frame.getGraphics();//Main.map.mapView.getGraphics(); 130 if (frame != null) { 131 Graphics g = frame.getGraphics(); 131 132 132 Rectangle r = oldRect; 133 if (r != null) { 134 //overwrite old rct 133 Rectangle r = oldRect; 134 if (r != null) { 135 //overwrite old rct 136 g.setXORMode(Color.BLACK); 137 g.setColor(Color.WHITE); 138 g.drawRect(r.x,r.y,r.width,r.height); 139 } 140 135 141 g.setXORMode(Color.BLACK); 136 142 g.setColor(Color.WHITE); 143 r = createRect(p1,p2); 137 144 g.drawRect(r.x,r.y,r.width,r.height); 145 oldRect = r; 138 146 } 139 140 g.setXORMode(Color.BLACK);141 g.setColor(Color.WHITE);142 r = createRect(p1,p2);143 g.drawRect(r.x,r.y,r.width,r.height);144 oldRect = r;145 147 } 146 148 … … 178 180 } 179 181 182 @Override 183 public void destroy() { 184 super.destroy(); 185 MapView.removeLayerChangeListener(this); 186 } 180 187 } -
applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/EditGpxPlugin.java
r23189 r28612 47 47 @Override 48 48 public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) { 49 if(oldFrame == null && newFrame != null) { 50 mode.setFrame(newFrame); 51 52 if(Main.map != null) 49 mode.setFrame(newFrame); 50 if (oldFrame == null && newFrame != null) { 51 if (Main.map != null) 53 52 Main.map.addMapMode(btn); 54 53 }
Note:
See TracChangeset
for help on using the changeset viewer.