Ticket #18702: 18702.patch

File 18702.patch, 1.8 KB (added by simon04, 4 years ago)
  • src/org/openstreetmap/josm/gui/preferences/display/DrawingPreference.java

    diff --git a/src/org/openstreetmap/josm/gui/preferences/display/DrawingPreference.java b/src/org/openstreetmap/josm/gui/preferences/display/DrawingPreference.java
    index 409b3cc33..6b89d5042 100644
    a b public PreferenceSetting createPreferenceSetting() {  
    7373
    7474    @Override
    7575    public void addGui(PreferenceTabbedPane gui) {
     76        addOsmPane(gui);
     77        addGpxPane(gui);
     78    }
     79
     80    private void addGpxPane(PreferenceTabbedPane gui) {
    7681        gpxPanel = new GPXSettingsPanel();
    7782        gui.addValidationListener(gpxPanel);
    7883        JPanel panel = gpxPanel;
    public void addGui(PreferenceTabbedPane gui) {  
    8186        scrollpane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    8287        GuiHelper.setDefaultIncrement(scrollpane);
    8388        gui.getDisplayPreference().addSubTab(this, tr("GPS Points"), scrollpane);
    84         panel = new JPanel(new GridBagLayout());
     89    }
     90
     91    private void addOsmPane(PreferenceTabbedPane gui) {
     92        JPanel panel = new JPanel(new GridBagLayout());
    8593        panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    8694
    8795        // directionHint
    public void addGui(PreferenceTabbedPane gui) {  
    200208        ExpertToggleAction.addVisibilitySwitcher(discardableKeys);
    201209
    202210        panel.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.BOTH));
    203         scrollpane = new JScrollPane(panel);
     211        JScrollPane scrollpane = new JScrollPane(panel);
    204212        scrollpane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    205213        GuiHelper.setDefaultIncrement(scrollpane);
    206214        gui.getDisplayPreference().addSubTab(this, tr("OSM Data"), scrollpane);