Changeset 19258 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2024-11-15T10:02:07+01:00 (29 hours ago)
Author:
stoecker
Message:

fix #24009 - don't call setting storage in settings setup stage or checkbox state gets lost

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/download/OSMDownloadSource.java

    r19106 r19258  
    197197        private final JPanel downloadSourcesPanel;
    198198
     199        private boolean inRestore = false;
     200
    199201        private final ChangeListener checkboxChangeListener;
    200202
     
    256258        @Override
    257259        public void rememberSettings() {
    258             DOWNLOAD_SOURCES.forEach(type -> type.getBooleanProperty().put(type.getCheckBox().isSelected()));
     260            if (!inRestore)
     261                DOWNLOAD_SOURCES.forEach(type -> type.getBooleanProperty().put(type.getCheckBox().isSelected()));
    259262        }
    260263
    261264        @Override
    262265        public void restoreSettings() {
     266            inRestore = true;
    263267            updateSources();
    264268            DOWNLOAD_SOURCES.forEach(type -> type.getCheckBox().setSelected(type.isEnabled()));
     269            inRestore = false;
    265270        }
    266271
Note: See TracChangeset for help on using the changeset viewer.