Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
don-vip committed May 10, 2017
1 parent c23d1f8 commit 782abbc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
public class DxfImportTask extends PleaseWaitRunnable {
LinkedList<Node> nodes = new LinkedList<>();
LinkedList<Way> ways = new LinkedList<>();
// private List<File> files; // old way, with multiple file conversion
private File file;
private boolean canceled;

Expand Down Expand Up @@ -169,8 +168,6 @@ protected void realRun() throws IOException, OsmTransferException {
try {
SVGUniverse universe = new SVGUniverse();
universe.setVerbose(Main.pref.getBoolean("importdxf.verbose", false));
// for (File f : files) {
// if (f.isDirectory()) continue;
if (canceled) {
return;
}
Expand All @@ -189,7 +186,6 @@ protected void realRun() throws IOException, OsmTransferException {
Rectangle2D bbox = root.getBoundingBox();
this.center = this.center.add(-bbox.getCenterX() * scale, bbox.getCenterY() * scale);
processElement(root, null);
// Files.delete(tempPath); // deleting temp file, leave no traces
} catch (IOException e) {
throw e;
} catch (Exception e) {
Expand All @@ -203,7 +199,6 @@ protected void realRun() throws IOException, OsmTransferException {
cmds.add(new AddCommand(w));
}
Main.main.undoRedo.add(new SequenceCommand("Import primitives", cmds));
// }
}

public static void processUsingKabeja(File file, String tempFile) {
Expand Down
22 changes: 0 additions & 22 deletions src/org/openstreetmap/josm/plugins/dxfimport/ImportDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
public class ImportDialog extends ExtendedDialog {
private JFormattedTextField tsdiv = new JFormattedTextField(NumberFormat.getInstance());
private JFormattedTextField tsnum = new JFormattedTextField(NumberFormat.getInstance());
// private JFormattedTextField tsteps = new JFormattedTextField(NumberFormat.getIntegerInstance());

public ImportDialog() {
super(Main.parent, tr("Import dxf"),
Expand All @@ -37,14 +36,8 @@ public ImportDialog() {
pscale.add(new JLabel(tr("m")), GBC.std().insets(10, 0, 0, 0));
panel.add(pscale, GBC.eop().fill(GBC.HORIZONTAL));

// final JLabel label = new JLabel("Curve steps:");
// panel.add(label, GBC.std());
// label.setLabelFor(tsteps);
// panel.add(tsteps, GBC.eol().fill(GBC.HORIZONTAL));

tsnum.setValue(Settings.getScaleNumerator());
tsdiv.setValue(Settings.getScaleDivisor());
// tsteps.setValue(Settings.getCurveSteps());

setContent(panel);
setupDialog();
Expand All @@ -70,24 +63,9 @@ public double getScaleDivisor() {
}
}

// public int getCurveSteps() {
// try {
// int result = NumberFormat.getIntegerInstance().parse(tsteps.getText()).intValue();
// if (result < 1)
// return 1;
// return result;
// } catch (ParseException e) {
// return 4;
// }
// }

public void saveSettings() {
Settings.setScaleNumerator(getScaleNumerator());
Settings.setScaleDivisor(getScaleDivisor());
// Settings.setCurveSteps(getCurveSteps());
System.out.println("Set_ScaleN:" + getScaleNumerator());
System.out.println("Set_ScaleD:" + getScaleDivisor());
// System.out.println("Set_CurveSteps:" + getCurveSteps());
}

}

0 comments on commit 782abbc

Please sign in to comment.