- Timestamp:
- 2022-09-27T18:34:33+02:00 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/IRelationEditorActionAccess.java
r18433 r18563 6 6 import org.openstreetmap.josm.data.osm.IRelation; 7 7 import org.openstreetmap.josm.data.osm.Relation; 8 import org.openstreetmap.josm.gui.MainApplication; 8 9 import org.openstreetmap.josm.gui.dialogs.relation.IRelationEditor; 9 10 import org.openstreetmap.josm.gui.dialogs.relation.MemberTable; … … 11 12 import org.openstreetmap.josm.gui.dialogs.relation.SelectionTable; 12 13 import org.openstreetmap.josm.gui.dialogs.relation.SelectionTableModel; 14 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 13 15 import org.openstreetmap.josm.gui.tagging.TagEditorModel; 14 16 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletingTextField; … … 76 78 final Relation newRelation; 77 79 final Relation oldRelation = getEditor().getRelation(); 78 if (oldRelation != null && oldRelation.getDataSet() != null && oldRelation.getDataSet().isLocked()) { 80 boolean isUploadInProgress = MainApplication.getLayerManager().getLayersOfType(OsmDataLayer.class) 81 .stream().anyMatch(OsmDataLayer::isUploadInProgress); 82 if (isUploadInProgress || oldRelation != null && oldRelation.getDataSet() != null && oldRelation.getDataSet().isLocked()) { 79 83 // If the dataset is locked, then we cannot change the relation. See JOSM #22024. 84 // We should also avoid changing the relation if there is an upload in progress. See JOSM #22268/#22398. 85 // There appears to be a race condition where a dataset might not be locked in the check, then is locked while using the 86 // copy relation constructor. 80 87 // This is due to the `setMembers` -> `addReferrer` call chain requires that the dataset is not read only. 81 88 return oldRelation;
Note:
See TracChangeset
for help on using the changeset viewer.