Changeset 11705 in josm


Ignore:
Timestamp:
2017-03-09T00:28:25+01:00 (7 years ago)
Author:
michael2402
Message:

Use Utils.clamp instead of Math.max(Math.min())

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/CommonSettingsPanel.java

    r10634 r11705  
    109109        this.btnFadeColor.setText(ColorHelper.color2html(colFadeColor));
    110110        this.fadeAmount.setValue(ImageryLayer.PROP_FADE_AMOUNT.get());
    111         this.sharpen.setSelectedIndex(Math.max(0, Math.min(2, ImageryLayer.PROP_SHARPEN_LEVEL.get())));
     111        this.sharpen.setSelectedIndex(Utils.clamp(ImageryLayer.PROP_SHARPEN_LEVEL.get(), 0, 2));
    112112        this.tilecacheDir.setText(CachedTileLoaderFactory.PROP_TILECACHE_DIR.get());
    113113        this.maxElementsOnDisk.setValue(AbstractCachedTileSourceLayer.MAX_DISK_CACHE_SIZE.get());
Note: See TracChangeset for help on using the changeset viewer.