Ignore:
Timestamp:
2011-01-02T00:36:28+01:00 (14 years ago)
Author:
pieren
Message:

moved grab action to a thread

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionGrabPlanImage.java

    r23190 r24934  
    106106        if (loadedFromCache) {
    107107            Main.map.repaint();
    108         } else if (wmsLayer.images.size() == 0) {
     108        } else if (wmsLayer.getImages().size() == 0) {
    109109            // action cancelled or image loaded from cache (and already georeferenced)
    110110            actionInterrupted();
     
    149149            countMouseClicked++;
    150150            // ignore clicks outside the image
    151             if (ea.east() < wmsLayer.images.get(0).min.east() || ea.east() > wmsLayer.images.get(0).max.east()
    152                     || ea.north() < wmsLayer.images.get(0).min.north() || ea.north() > wmsLayer.images.get(0).max.north())
     151            if (ea.east() < wmsLayer.getImage(0).min.east() || ea.east() > wmsLayer.getImage(0).max.east()
     152                    || ea.north() < wmsLayer.getImage(0).min.north() || ea.north() > wmsLayer.getImage(0).max.north())
    153153                return;
    154154            if (mode == cGetCorners) {
     
    259259        Main.map.mapView.removeMouseListener(this);
    260260        affineTransform(ea1, ea2, georefpoint1, georefpoint2);
    261         wmsLayer.saveNewCache();
     261        wmsLayer.grabThread.saveNewCache();
    262262        Main.map.mapView.repaint();
    263263        actionCompleted();
     
    378378        double dx = dst1.getX() - org1.getX();
    379379        double dy = dst1.getY() - org1.getY();
    380         wmsLayer.images.get(0).shear(dx, dy);
     380        wmsLayer.getImage(0).shear(dx, dy);
    381381        org1 = org1.add(dx, dy); // org1=dst1 now
    382382        org2 = org2.add(dx, dy);
    383383        // rotate : org1(=dst1 now) is anchor for rotation and scale
    384         wmsLayer.images.get(0).rotate(dst1, angle);
     384        wmsLayer.getImage(0).rotate(dst1, angle);
    385385        org2 = org2.rotate(dst1, angle);
    386386        // scale image from anchor org1(=dst1 now)
    387         wmsLayer.images.get(0).scale(dst1, proportion);
     387        wmsLayer.getImage(0).scale(dst1, proportion);
    388388    }
    389389
     
    392392        georefpoint2 = new EastNorth(wmsLayer.X0+wmsLayer.fX*wmsLayer.communeBBox.max.getX(),
    393393                wmsLayer.Y0+wmsLayer.fY*wmsLayer.communeBBox.max.getX());
    394         ea1 = new EastNorth(wmsLayer.images.get(0).min.east(), wmsLayer.images.get(0).max.north());
    395         EastNorth ea2 = wmsLayer.images.get(0).max;
     394        ea1 = new EastNorth(wmsLayer.getImage(0).min.east(), wmsLayer.getImage(0).max.north());
     395        EastNorth ea2 = wmsLayer.getImage(0).max;
    396396        affineTransform(ea1, ea2, georefpoint1, georefpoint2);
    397         wmsLayer.saveNewCache();
     397        wmsLayer.grabThread.saveNewCache();
    398398        Main.map.mapView.repaint();
    399399    }
Note: See TracChangeset for help on using the changeset viewer.