Ignore:
Timestamp:
2010-11-04T19:49:47+01:00 (14 years ago)
Author:
extropy
Message:

Pdfimport: Fixed path optimization bug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/pdfimport/src/pdfimport/PathOptimizer.java

    r24061 r24069  
    354354                                                //remove excess segments from start of chain
    355355                                                while (lastPoint != firstPoint) {
    356                                                         PdfPath pathToRemove = pathChain.get(0);
     356                                                        PdfPath pathToRemove = pathChain.remove(0);                                                     
    357357                                                        firstPoint = pathToRemove.getOtherEnd(firstPoint);
    358358                                                }
     
    379379                                        pathChain.add(0, firstPath);
    380380
    381                                         if (!pointsInPath.contains(nextPoint)) {
     381                                        if (!pointsInPath.contains(firstPoint)) {
    382382                                                pointsInPath.add(firstPoint);
    383383                                                changed = true;
     
    388388                                                //remove excess segments from end of chain
    389389                                                while (lastPoint != firstPoint) {
    390                                                         PdfPath pathToRemove = pathChain.get(pathChain.size() - 1);
     390                                                        PdfPath pathToRemove = pathChain.remove(pathChain.size() - 1);
    391391                                                        lastPoint = pathToRemove.getOtherEnd(lastPoint);
    392392                                                }
Note: See TracChangeset for help on using the changeset viewer.