Ignore:
Timestamp:
2009-07-25T10:35:53+02:00 (15 years ago)
Author:
jttt
Message:

Enable validate action only when there is edit layer available

Location:
applications/editors/josm/plugins/validator
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/validator/.classpath

    r2794 r16681  
    22<classpath>
    33        <classpathentry kind="src" path="src"/>
    4         <classpathentry combineaccessrules="false" kind="src" path="/josm"/>
     4        <classpathentry including="images/" kind="src" path=""/>
    55        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JDK 5"/>
     6        <classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
    67        <classpathentry kind="output" path="build"/>
    78</classpath>
  • applications/editors/josm/plugins/validator/.settings/org.eclipse.jdt.core.prefs

    r10662 r16681  
    1 #Sun Sep 07 16:57:55 CEST 2008
     1#Fri Jun 26 21:35:48 CEST 2009
    22eclipse.preferences.version=1
    33org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/OSMValidatorPlugin.java

    r13497 r16681  
    7272    /** The list of errors per layer*/
    7373    Map<Layer, List<TestError>> layerErrors = new HashMap<Layer, List<TestError>>();
    74    
     74
    7575    /** Grid detail, multiplier of east,north values for valuable cell sizing */
    7676    public static double griddetail;
     
    122122        }
    123123    }
    124    
     124
    125125    private void loadIgnoredErrors() {
    126126        ignoredErrors.clear();
     
    250250    /**
    251251     * Initialize grid details based on current projection system. Values based on
    252      * the original value fixed for EPSG:4326 (10000) using heuristics (that is, test&error 
     252     * the original value fixed for EPSG:4326 (10000) using heuristics (that is, test&error
    253253     * until most bugs were discovered while keeping the processing time reasonable)
    254254     */
     
    261261            OSMValidatorPlugin.griddetail = 0.1;
    262262    }
    263    
     263
    264264    /**
    265265     * Initializes all tests
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidateAction.java

    r16629 r16681  
    111111        DataSet.fireSelectionChanged(Main.main.getCurrentDataSet().getSelected());
    112112    }
     113
     114    @Override
     115    public void updateEnabledState() {
     116        setEnabled(getEditLayer() != null);
     117    }
    113118}
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java

    r16629 r16681  
    9898        selectButton.setEnabled(false);
    9999        buttonPanel.add(selectButton);
    100         buttonPanel.add(new SideButton(marktr("Validate"), "refresh", "Validator",
    101                 tr("Validate either current selection or complete dataset."), this));
     100        buttonPanel.add(new SideButton(plugin.validateAction), "refresh");
    102101        fixButton = new SideButton(marktr("Fix"), "fix", "Validator", tr("Fix the selected errors."), this);
    103102        fixButton.setEnabled(false);
     
    302301        if (actionCommand.equals("Select"))
    303302            setSelectedItems();
    304         else if (actionCommand.equals("Validate"))
    305             plugin.validateAction.actionPerformed(e);
    306303        else if (actionCommand.equals("Fix"))
    307304            fixErrors(e);
Note: See TracChangeset for help on using the changeset viewer.