Changeset 22004 in osm for applications


Ignore:
Timestamp:
2010-06-25T10:38:59+02:00 (14 years ago)
Author:
stoecker
Message:

add autozoom, fix untagged node issue

Location:
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java

    r20828 r22004  
    3434
    3535import org.openstreetmap.josm.Main;
     36import org.openstreetmap.josm.actions.AutoScaleAction;
    3637import org.openstreetmap.josm.command.Command;
    3738import org.openstreetmap.josm.data.SelectionChangedListener;
     
    386387            if (isDblClick) {
    387388                Main.main.getCurrentDataSet().setSelected(sel);
     389                if(Main.pref.getBoolean("validator.autozoom", false))
     390                    AutoScaleAction.zoomTo(sel);
    388391            }
    389392        }
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UntaggedNode.java

    r20828 r22004  
    2626{
    2727    protected static int UNTAGGED_NODE = 201;
     28    protected static int COMMENT_NODE = 202;
    2829
    2930    /** Bag of all nodes */
     
    6869        for(Node node : emptyNodes)
    6970        {
    70             errors.add( new TestError(this, Severity.OTHER, tr("Untagged and unconnected nodes"), UNTAGGED_NODE, node) );
     71            if(node.hasKeys())
     72                errors.add( new TestError(this, Severity.OTHER, tr("Untagged and unconnected nodes (commented)"), COMMENT_NODE, node) );
     73            else
     74                errors.add( new TestError(this, Severity.OTHER, tr("Untagged and unconnected nodes"), UNTAGGED_NODE, node) );
    7175        }
    7276        emptyNodes = null;
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UntaggedWay.java

    r20828 r22004  
    3737    /** Unnamed junction error */
    3838    protected static final int UNNAMED_JUNCTION  = 305;
     39    /** Untagged, but commented way error */
     40    protected static final int COMMENTED_WAY = 306;
    3941
    4042    private LinkedList<Way> multipolygonways;
     
    99101        if(!w.isTagged() && !multipolygonways.contains(w))
    100102        {
    101             errors.add( new TestError(this, Severity.WARNING, tr("Untagged ways"), UNTAGGED_WAY, w) );
     103            if(w.hasKeys())
     104                errors.add( new TestError(this, Severity.WARNING, tr("Untagged ways (commented)"), COMMENTED_WAY, w) );
     105            else
     106                errors.add( new TestError(this, Severity.WARNING, tr("Untagged ways"), UNTAGGED_WAY, w) );
    102107        }
    103108
Note: See TracChangeset for help on using the changeset viewer.