Changeset 4301 in josm
- Timestamp:
- 2011-08-08T00:32:38+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java
r4195 r4301 90 90 public static final BooleanProperty PROP_DEFAULT_AUTOZOOM = new BooleanProperty(PREFERENCE_PREFIX + ".default_autozoom", true); 91 91 public static final BooleanProperty PROP_DEFAULT_AUTOLOAD = new BooleanProperty(PREFERENCE_PREFIX + ".default_autoload", true); 92 public static final BooleanProperty PROP_DEFAULT_SHOWERRORS = new BooleanProperty(PREFERENCE_PREFIX + ".default_showerrors", true); 92 93 public static final IntegerProperty PROP_MIN_ZOOM_LVL = new IntegerProperty(PREFERENCE_PREFIX + ".min_zoom_lvl", DEFAULT_MIN_ZOOM); 93 94 public static final IntegerProperty PROP_MAX_ZOOM_LVL = new IntegerProperty(PREFERENCE_PREFIX + ".max_zoom_lvl", DEFAULT_MAX_ZOOM); … … 156 157 JCheckBoxMenuItem autoZoomPopup; 157 158 JCheckBoxMenuItem autoLoadPopup; 159 JCheckBoxMenuItem showErrorsPopup; 158 160 Tile showMetadataTile; 159 161 private Image attrImage; … … 171 173 protected boolean autoZoom; 172 174 protected boolean autoLoad; 175 protected boolean showErrors; 173 176 174 177 void redraw() … … 321 324 322 325 if(!isProjectionSupported(Main.getProjection())) { 323 324 325 326 327 328 326 JOptionPane.showMessageDialog(Main.parent, 327 tr("TMS layers do not support the projection {0}.\n{1}\n" 328 + "Change the projection or remove the layer.", 329 Main.getProjection().toCode(), nameSupportedProjections()), 330 tr("Warning"), 331 JOptionPane.WARNING_MESSAGE); 329 332 } 330 333 … … 360 363 autoLoadPopup.setSelected(autoLoad); 361 364 tileOptionMenu.add(autoLoadPopup); 365 366 showErrors = PROP_DEFAULT_SHOWERRORS.get(); 367 showErrorsPopup = new JCheckBoxMenuItem(); 368 showErrorsPopup.setAction(new AbstractAction(tr("Show Errors")) { 369 @Override 370 public void actionPerformed(ActionEvent ae) { 371 showErrors = !showErrors; 372 } 373 }); 374 showErrorsPopup.setSelected(showErrors); 375 tileOptionMenu.add(showErrorsPopup); 362 376 363 377 tileOptionMenu.add(new JMenuItem(new AbstractAction(tr("Load Tile")) { … … 854 868 }*/ 855 869 856 if (tile.hasError() ) {870 if (tile.hasError() && showErrors) { 857 871 myDrawString(g, tr("Error") + ": " + tr(tile.getErrorMessage()), p.x + 2, texty); 858 872 texty += 1 + fontHeight;
Note:
See TracChangeset
for help on using the changeset viewer.