Merge pull request #5785 from ethteck/6248-geoloc-zoom-slider-bug

6248 Fixed the geoloc zoom slider snap bug
This commit is contained in:
Richard Cordovano 2020-04-09 16:44:23 -04:00 committed by GitHub
commit 01ff4fb9d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -310,7 +310,7 @@ final public class MapPanel extends javax.swing.JPanel {
void setZoom(int zoom) {
zoomChanging = true;
mapViewer.setZoom(zoom);
zoomSlider.setValue((zoomSlider.getMaximum() + zoomSlider.getMinimum()) - zoom);
zoomSlider.setValue(zoom);
zoomChanging = false;
}
@ -572,6 +572,7 @@ final public class MapPanel extends javax.swing.JPanel {
zoomSlider.setOrientation(javax.swing.JSlider.VERTICAL);
zoomSlider.setPaintTicks(true);
zoomSlider.setSnapToTicks(true);
zoomSlider.setInverted(true);
zoomSlider.setMinimumSize(new java.awt.Dimension(35, 100));
zoomSlider.setOpaque(false);
zoomSlider.setPreferredSize(new java.awt.Dimension(35, 190));