Ignore:
Timestamp:
2017-12-02T21:06:00+01:00 (6 years ago)
Author:
Don-vip
Message:

fix recent Sonar issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java

    r13131 r13186  
    779779
    780780        // overscan to prevent empty edges when zooming in to zoom scales > 2:1
    781         if (w > imgRect.width && h > imgRect.height && !imgRect.isFullView1D()) {
    782             if (wFact != hFact) {
    783                 if (wFact > hFact) {
    784                     w = compRect.width;
    785                     x = 0;
    786                     h = wFact / imgRect.width;
    787                     y = (compRect.height - h) / 2;
    788                 } else {
    789                     h = compRect.height;
    790                     y = 0;
    791                     w = hFact / imgRect.height;
    792                     x = (compRect.width - w) / 2;
    793                 }
     781        if (w > imgRect.width && h > imgRect.height && !imgRect.isFullView1D() && wFact != hFact) {
     782            if (wFact > hFact) {
     783                w = compRect.width;
     784                x = 0;
     785                h = wFact / imgRect.width;
     786                y = (compRect.height - h) / 2;
     787            } else {
     788                h = compRect.height;
     789                y = 0;
     790                w = hFact / imgRect.height;
     791                x = (compRect.width - w) / 2;
    794792            }
    795793        }
Note: See TracChangeset for help on using the changeset viewer.