From 970825b21476651b21ec05bdfb9ba93a98ff6d18 Mon Sep 17 00:00:00 2001 From: stoecker Date: Fri, 15 Nov 2024 09:02:07 +0000 Subject: [PATCH] fix #24009 - don't call setting storage in settings setup stage or checkbox state gets lost git-svn-id: https://josm.openstreetmap.de/svn/trunk@19258 0c6e7542-c601-0410-84e7-c038aed88b3b --- .../openstreetmap/josm/gui/download/OSMDownloadSource.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/org/openstreetmap/josm/gui/download/OSMDownloadSource.java b/src/org/openstreetmap/josm/gui/download/OSMDownloadSource.java index da912c7e218..37aa4b4ab4c 100644 --- a/src/org/openstreetmap/josm/gui/download/OSMDownloadSource.java +++ b/src/org/openstreetmap/josm/gui/download/OSMDownloadSource.java @@ -196,6 +196,8 @@ public static class OSMDownloadSourcePanel extends AbstractDownloadSourcePanel getData() { @Override public void rememberSettings() { - DOWNLOAD_SOURCES.forEach(type -> type.getBooleanProperty().put(type.getCheckBox().isSelected())); + if (!inRestore) + DOWNLOAD_SOURCES.forEach(type -> type.getBooleanProperty().put(type.getCheckBox().isSelected())); } @Override public void restoreSettings() { + inRestore = true; updateSources(); DOWNLOAD_SOURCES.forEach(type -> type.getCheckBox().setSelected(type.isEnabled())); + inRestore = false; } @Override