Changeset 11537 in josm
- Timestamp:
- 2017-02-04T15:31:22+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java
r10469 r11537 158 158 159 159 /** 160 * <p>Replies true, if {@code Renderer} is already a registered map renderer 161 * class.</p> 160 * <p>Replies true, if {@code Renderer} is already a registered map renderer class.</p> 162 161 * 163 162 * @param renderer the map renderer class. Must not be null. 164 * @return true, if {@code Renderer} is already a registered map renderer 165 * class 163 * @return true, if {@code Renderer} is already a registered map renderer class 166 164 * @throws IllegalArgumentException if {@code renderer} is null 167 165 */ … … 169 167 CheckParameterUtil.ensureParameterNotNull(renderer); 170 168 for (Descriptor d: descriptors) { 171 if (d.getRenderer(). getName().equals(renderer.getName())) return true;169 if (d.getRenderer().equals(renderer)) return true; 172 170 } 173 171 return false; … … 210 208 while (it.hasNext()) { 211 209 Descriptor d = it.next(); 212 if (d.getRenderer(). getName().equals(renderer.getName())) {210 if (d.getRenderer().equals(renderer)) { 213 211 it.remove(); 214 212 break; 215 213 } 216 214 } 217 if (activeRenderer != null && activeRenderer. getName().equals(renderer.getName())) {215 if (activeRenderer != null && activeRenderer.equals(renderer)) { 218 216 activateDefault(); 219 217 } … … 288 286 289 287 /** 290 * <p>Replies true, if currently the wireframe map renderer is active. Otherwise, 291 * false.</p> 288 * <p>Replies true, if currently the wireframe map renderer is active. Otherwise, false.</p> 292 289 * 293 290 * <p>There is a specific method for {@link WireframeMapRenderer} for legacy support. … … 296 293 * (menu entries, etc.) which toggle between these two renderers only.</p> 297 294 * 298 * @return true, if currently the wireframe map renderer is active. Otherwise, 299 * false 295 * @return true, if currently the wireframe map renderer is active. Otherwise, false 300 296 */ 301 297 public boolean isWireframeMapRendererActive() { 302 return activeRenderer != null && activeRenderer.getName().equals(WireframeMapRenderer.class.getName());298 return WireframeMapRenderer.class.equals(activeRenderer); 303 299 } 304 300 }
Note:
See TracChangeset
for help on using the changeset viewer.