Changeset 9238 in josm for trunk/src/org


Ignore:
Timestamp:
2016-01-01T14:55:14+01:00 (4 years ago)
Author:
stoecker
Message:

see #8562 - restart JOSM in case we switched from IPv6 to IPv4 only, so we have no broken connection

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/Main.java

    r9222 r9238  
    10831083            ImageProvider.shutdown(false);
    10841084            JCSCacheManager.shutdown();
    1085             geometry.remember("gui.geometry");
     1085            if (geometry != null) {
     1086                geometry.remember("gui.geometry");
     1087            }
    10861088            if (map != null) {
    10871089                map.rememberToggleDialogWidth();
  • trunk/src/org/openstreetmap/josm/actions/RestartAction.java

    r8846 r9238  
    4646        putValue("help", ht("/Action/Restart"));
    4747        putValue("toolbar", "action/restart");
    48         Main.toolbar.register(this);
     48        if (Main.toolbar != null) {
     49            Main.toolbar.register(this);
     50        }
    4951        setEnabled(isRestartSupported());
    5052    }
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r9171 r9238  
    44import static org.openstreetmap.josm.tools.I18n.tr;
    55import static org.openstreetmap.josm.tools.I18n.trn;
     6import gnu.getopt.Getopt;
     7import gnu.getopt.LongOpt;
    68
    79import java.awt.Dimension;
     
    4850import org.openstreetmap.josm.Main;
    4951import org.openstreetmap.josm.actions.PreferencesAction;
     52import org.openstreetmap.josm.actions.RestartAction;
    5053import org.openstreetmap.josm.data.AutosaveTask;
    5154import org.openstreetmap.josm.data.CustomConfigurator;
     
    7174import org.openstreetmap.josm.tools.PlatformHookWindows;
    7275import org.openstreetmap.josm.tools.Utils;
    73 
    74 import gnu.getopt.Getopt;
    75 import gnu.getopt.LongOpt;
    7676
    7777/**
     
    583583                    if (wasv6 && !hasv6) {
    584584                        Main.info(tr("Detected no useable IPv6 network, prefering IPv4 over IPv6 after next restart."));
     585                        Main.pref.put("validated.ipv6", hasv6); // be sure it is stored before the restart!
     586                        new RestartAction().actionPerformed(null);
    585587                    }
    586588                    Main.pref.put("validated.ipv6", hasv6);
Note: See TracChangeset for help on using the changeset viewer.