Attempt to auto populate the MapWithAI default servers

Signed-off-by: Taylor Smock <taylor.smock@kaart.com>
pull/1/head
Taylor Smock 2020-04-23 11:45:30 -06:00
rodzic fd6f3c5087
commit 286b7ad674
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 625F6A74A3E4311A
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -188,6 +188,10 @@ public final class MapWithAIDataUtils {
final Notification noUrls = MapWithAIPreferenceHelper.getMapWithAIUrl().isEmpty() ? new Notification(tr(
"There are no defined URLs. To add sources, go to Preferences -> MapWithAI -> Servers and add the appropriate servers"))
: new Notification(tr("No URLS are enabled"));
if (MapWithAIPreferenceHelper.getMapWithAIUrl().isEmpty()
&& MapWithAILayerInfo.instance.getDefaultLayers().isEmpty()) {
MapWithAILayerInfo.instance.loadDefaults(true, MainApplication.worker, false, () -> getData(bbox));
}
noUrls.setDuration(Notification.TIME_DEFAULT);
noUrls.setIcon(JOptionPane.INFORMATION_MESSAGE);
noUrls.setHelpTopic(ht("Plugin/MapWithAI#Preferences"));