Changeset 1262 in josm


Ignore:
Timestamp:
2009-01-14T18:32:30+01:00 (16 years ago)
Author:
stoecker
Message:

fix #1914. slightly modified patch by xeen

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java

    r1245 r1262  
    8080        Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
    8181            Shortcut.registerShortcut("mapmode:drawfocus", tr("Mode: Draw Focus"), KeyEvent.VK_N, Shortcut.GROUP_EDIT).getKeyStroke(), tr("Draw"));
    82 
    83         //putValue("help", "Action/AddNode/Autnode");
    84         selectedColor = Main.pref.getColor(marktr("selected"), Color.red);
    85 
    86         drawHelperLine = Main.pref.getBoolean("draw.helper-line", true);
    8782    }
    8883
     
    9792    @Override public void enterMode() {
    9893        super.enterMode();
     94        selectedColor = Main.pref.getColor(marktr("selected"), Color.red);
     95        drawHelperLine = Main.pref.getBoolean("draw.helper-line", true);
     96
    9997        Main.map.mapView.addMouseListener(this);
    10098        Main.map.mapView.addMouseMotionListener(this);
  • trunk/src/org/openstreetmap/josm/gui/preferences/LafPreference.java

    r1180 r1262  
    3232    private JCheckBox showSplashScreen = new JCheckBox(tr("Show splash screen at startup"));
    3333    private JCheckBox showID = new JCheckBox(tr("Show object ID in selection lists"));
     34    private JCheckBox drawHelperLine = new JCheckBox(tr("Draw rubber-band helper line"));
    3435
    3536    public void addGui(PreferenceDialog gui) {
     
    7778        panel.add(showID, GBC.eop().insets(20, 0, 0, 0));
    7879
     80        drawHelperLine.setToolTipText(tr("Draw rubber-band helper line"));
     81        drawHelperLine.setSelected(Main.pref.getBoolean("draw.helper-line", true));
     82        panel.add(drawHelperLine, GBC.eop().insets(20, 0, 0, 0));
     83
    7984        panel.add(Box.createVerticalGlue(), GBC.eol().insets(0, 20, 0, 0));
    8085
     
    9196        Main.pref.put("draw.splashscreen", showSplashScreen.isSelected());
    9297        Main.pref.put("osm-primitives.showid", showID.isSelected());
     98        Main.pref.put("draw.helper-line", drawHelperLine.isSelected());
    9399        return Main.pref.put("laf", ((LookAndFeelInfo)lafCombo.getSelectedItem()).getClassName());
    94100    }
Note: See TracChangeset for help on using the changeset viewer.