Ignore:
Timestamp:
2009-02-18T23:31:32+01:00 (17 years ago)
Author:
pieren
Message:

Fix minor bugs, add the fixed size grab scale configurable, fix pbls in transparency.

File:
1 edited

Legend:

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

    r13611 r13784  
    1818import java.util.LinkedList;
    1919import java.util.List;
     20
     21import javax.swing.JOptionPane;
    2022
    2123import org.openstreetmap.josm.Main;
     
    9496     */
    9597    private void createWay(String svg) {
    96         String[] SVGpaths = new SVGParser().getPaths(svg);
     98        String[] SVGpaths = new SVGParser().getClosedPaths(svg);
    9799        ArrayList<Double> fitViewBox = new ArrayList<Double>(); 
    98100        ArrayList<ArrayList<EastNorth>> eastNorths = new ArrayList<ArrayList<EastNorth>>();
     
    116118        }
    117119        wayToAdd.nodes.add(wayToAdd.nodes.get(0)); // close the circle
    118         new SimplifyWay().simplifyWay(wayToAdd);
     120       
     121        // simplify the way
     122        double threshold = Double.parseDouble(Main.pref.get("cadastrewms.simplify-way-boundary", "1.0"));
     123        new SimplifyWay().simplifyWay(wayToAdd, Main.ds, threshold);
     124       
    119125        cmds.add(new AddCommand(wayToAdd));
    120126        Main.main.undoRedo.add(new SequenceCommand(tr("Create boundary"), cmds));
     
    205211
    206212    public static void download(WMSLayer wmsLayer) {
     213        if (CadastrePlugin.autoSourcing == false) {
     214            JOptionPane.showMessageDialog(Main.parent,
     215                    tr("Please, enable auto-sourcing and check cadastre millesime."));
     216            return;
     217        }
    207218        Main.worker.execute(new DownloadSVGTask(wmsLayer));
    208219    }
Note: See TracChangeset for help on using the changeset viewer.