Changeset 32823 in osm for applications/editors


Ignore:
Timestamp:
2016-08-16T23:43:26+02:00 (8 years ago)
Author:
darya
Message:

fix bug at the pre-last stop

Location:
applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/PTAssistantPlugin.java

    r32585 r32823  
    1111import org.openstreetmap.josm.plugins.PluginInformation;
    1212import org.openstreetmap.josm.plugins.pt_assistant.actions.AddStopPositionAction;
     13import org.openstreetmap.josm.plugins.pt_assistant.actions.RepeatLastFixAction;
    1314import org.openstreetmap.josm.plugins.pt_assistant.validation.PTAssistantValidatorTest;
    1415
     
    2223
    2324        private JMenuItem addStopPositionMenu;
     25        private JMenuItem repeatLastFixMenu;
    2426
    2527        /**
     
    3739                AddStopPositionAction addStopPositionAction = new AddStopPositionAction();
    3840                addStopPositionMenu = MainMenu.add(Main.main.menu.toolsMenu, addStopPositionAction, false);
    39 
     41                RepeatLastFixAction repeatLastFixAction = new RepeatLastFixAction();
     42                repeatLastFixMenu = MainMenu.add(Main.main.menu.toolsMenu, repeatLastFixAction, false);
     43               
    4044        }
    4145
  • applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/data/PTRouteDataManager.java

    r32819 r32823  
    4545
    4646                PTStop prev = null; // stores the last created PTStop
    47 
     47               
    4848                for (RelationMember member : this.relation.getMembers()) {
    4949
     
    6161                                                // Squared distance of 0.000004 corresponds to
    6262                                                // around 100 m
    63                                                 if (this.calculateDistanceSq(member, prev) < 0.000004) {
    64 
     63                                                if (this.calculateDistanceSq(member, prev) < 0.000001) {
    6564                                                        stopExists = true;
    6665                                                }
     66                                               
    6767                                        } else {
    6868
     
    9999
    100100                        } else {
     101                       
    101102                                this.failedMembers.add(member);
     103                               
    102104                        }
    103105
Note: See TracChangeset for help on using the changeset viewer.