Changeset 28027 in osm for applications/editors/josm/plugins/conflation/src
- Timestamp:
- 2012-03-10T06:18:26+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationCandidateList.java
r27971 r28027 1 /*2 * To change this template, choose Tools | Templates3 * and open the template in the editor.4 */5 1 package org.openstreetmap.josm.plugins.conflation; 6 2 -
applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationToggleDialog.java
r27997 r28027 1 1 package org.openstreetmap.josm.plugins.conflation; 2 2 3 import utilsplugin2.dumbutils.HungarianAlgorithm; 3 4 import java.awt.BorderLayout; 4 5 import java.awt.Component; … … 206 207 @Override 207 208 public void actionPerformed(ActionEvent e) { 209 //FIXME: should layer listen for selection change? 208 210 ConflationCandidate c = conflationLayer.getSelectedCandidate(); 211 if (c.getReferenceLayer() != c.getSubjectLayer()) { 212 JOptionPane.showMessageDialog(Main.parent, tr("Conflation between layers isn't supported yet."), 213 tr("Cannot conflate between layes"), JOptionPane.ERROR_MESSAGE); 214 return; 215 } 209 216 if (ReplaceGeometryUtils.replace(c.getReferenceObject(), c.getSubjectObject())) { 210 217 candidates.remove(c); … … 331 338 int n = subjectSelection.size(); 332 339 int m = referenceSelection.size(); 333 int maxLen = Math.max(n, m); 334 double cost[][] = new double[maxLen][maxLen]; 340 double cost[][] = new double[n][m]; 335 341 336 342 // calculate cost matrix … … 345 351 OsmPrimitive subObject, refObject; 346 352 candidates.clear(); 347 for (int i = 0; i < maxLen; i++) {353 for (int i = 0; i < n; i++) { 348 354 int subIdx = assignment[i][0]; 349 355 int refIdx = assignment[i][1];
Note:
See TracChangeset
for help on using the changeset viewer.