Ignore:
Timestamp:
2017-05-31T10:40:14+02:00 (7 years ago)
Author:
giackserva
Message:

applied #josm14861

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

Legend:

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

    r33345 r33347  
    1818import org.openstreetmap.josm.data.validation.Test;
    1919import org.openstreetmap.josm.data.validation.TestError;
    20 import org.openstreetmap.josm.gui.dialogs.relation.GenericRelationEditor;
    2120import org.openstreetmap.josm.gui.dialogs.relation.RelationEditor;
    2221import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     
    133132                && testError.getCode() != PTAssistantValidatorTest.ERROR_CODE_DIRECTION
    134133                && testError.getCode() != PTAssistantValidatorTest.ERROR_CODE_CONSTRUCTION
    135                 && testError.getCode() != PTAssistantValidatorTest.ERROR_CODE_ROAD_TYPE) {
     134                && testError.getCode() != PTAssistantValidatorTest.ERROR_CODE_ROAD_TYPE
     135                && testError.getCode() != PTAssistantValidatorTest.ERROR_CODE_END_STOP) {
    136136            return null;
    137137        }
     
    155155
    156156                if (SwingUtilities.isEventDispatchThread()) {
    157 
    158157                    showRelationEditorAndZoom(layerParameter, relationParameter, zoomParameter);
    159158
     
    163162                        @Override
    164163                        public void run() {
    165 
    166164                            showRelationEditorAndZoom(layerParameter, relationParameter, zoomParameter);
    167 
    168165                        }
    169166                    });
    170 
    171167                }
    172 
    173168                return command;
    174169            }
     
    176171
    177172        return null;
    178 
    179173    }
    180174
     
    190184
    191185        // create editor:
    192         GenericRelationEditor editor = (GenericRelationEditor) RelationEditor.getEditor(layer, r,
     186        RelationEditor editor = RelationEditor.getEditor(layer, r,
    193187                r.getMembersFor(primitives));
    194188
  • applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/validation/PTAssistantValidatorTest.java

    r33345 r33347  
    465465        @Override
    466466        public boolean isFixable(TestError testError) {
    467                 if (testError.getCode() == ERROR_CODE_DIRECTION || testError.getCode() == ERROR_CODE_ROAD_TYPE
    468                                 || testError.getCode() == ERROR_CODE_CONSTRUCTION || testError.getCode() == ERROR_CODE_SORTING
    469                                 || testError.getCode() == PTAssistantValidatorTest.ERROR_CODE_SOLITARY_STOP_POSITION
    470                                 || testError.getCode() == PTAssistantValidatorTest.ERROR_CODE_PLATFORM_PART_OF_HIGHWAY) {
     467                if (testError.getCode() == ERROR_CODE_DIRECTION
     468                                || testError.getCode() == ERROR_CODE_ROAD_TYPE
     469                                || testError.getCode() == ERROR_CODE_CONSTRUCTION
     470                                || testError.getCode() == ERROR_CODE_SORTING
     471                                || testError.getCode() == ERROR_CODE_END_STOP
     472                                || testError.getCode() == ERROR_CODE_PLATFORM_PART_OF_HIGHWAY) {
    471473                        return true;
    472474                }
     
    496498                List<Command> commands = new ArrayList<>();
    497499
    498                 if (testError.getCode() == ERROR_CODE_ROAD_TYPE || testError.getCode() == ERROR_CODE_CONSTRUCTION) {
     500                if (testError.getCode() == ERROR_CODE_ROAD_TYPE
     501                                || testError.getCode() == ERROR_CODE_CONSTRUCTION
     502                                || testError.getCode() == ERROR_CODE_DIRECTION
     503                                || testError.getCode() == ERROR_CODE_END_STOP) {
    499504                        commands.add(WayChecker.fixErrorByZooming(testError));
    500                 }
    501 
    502                 if (testError.getCode() == ERROR_CODE_DIRECTION) {
    503                         commands.add(WayChecker.fixErrorByZooming(testError));
    504 
    505505                }
    506506
Note: See TracChangeset for help on using the changeset viewer.