- if (snapMode == null) {
- zoomBoxModel.setSelectedItem(
- Integer.toString((int) Math.round(zoom * 100)) + " %");
+ if (zoom > 0) {
+ String zoomStr = Integer.toString((int) Math.round(zoom * 100))
+ + " %";
+ zoomLabel.setText(zoomStr);
+ if (snapMode == null) {
+ zoomBoxModel.setSelectedItem(zoomStr);
+ }