diff --git a/src/main/java/de/blau/android/Logic.java b/src/main/java/de/blau/android/Logic.java index edfbed079..318915952 100644 --- a/src/main/java/de/blau/android/Logic.java +++ b/src/main/java/de/blau/android/Logic.java @@ -653,8 +653,9 @@ public float strokeWidth(long width) { */ public void createCheckpoint(@Nullable Activity activity, int stringId) { Resources r = activity != null ? activity.getResources() : App.resources(); - boolean firstCheckpoint = !getDelegator().getUndo().canUndo(); - getDelegator().getUndo().createCheckpoint(r.getString(stringId)); + final UndoStorage undo = getDelegator().getUndo(); + boolean firstCheckpoint = !undo.canUndo(); + undo.createCheckpoint(r.getString(stringId)); getDelegator().recordImagery(map); if (firstCheckpoint && activity instanceof AppCompatActivity) { ((AppCompatActivity) activity).invalidateOptionsMenu(); diff --git a/src/main/java/de/blau/android/easyedit/EditRelationMembersActionModeCallback.java b/src/main/java/de/blau/android/easyedit/EditRelationMembersActionModeCallback.java index c07188ba7..755aa6aa5 100644 --- a/src/main/java/de/blau/android/easyedit/EditRelationMembersActionModeCallback.java +++ b/src/main/java/de/blau/android/easyedit/EditRelationMembersActionModeCallback.java @@ -541,7 +541,7 @@ private void moveOuterTags(@NonNull Map tags) { if (!tags.isEmpty()) { AlertDialog alertDialog = new AlertDialog.Builder(main).setTitle(R.string.move_outer_tags_title).setMessage(R.string.move_outer_tags_message) .setPositiveButton(R.string.move, (dialog, which) -> { - logic.getUndo().createCheckpoint(main.getString(R.string.undo_action_move_tags)); + logic.createCheckpoint(main, R.string.undo_action_move_tags); RelationUtils.moveOuterTags(App.getDelegator(), relation); }).setNeutralButton(R.string.leave_as_is, null).create(); alertDialog.setOnDismissListener(dialog -> finishMode.run()); diff --git a/src/main/java/de/blau/android/osm/MergeAction.java b/src/main/java/de/blau/android/osm/MergeAction.java index 143ad68b1..02941088b 100644 --- a/src/main/java/de/blau/android/osm/MergeAction.java +++ b/src/main/java/de/blau/android/osm/MergeAction.java @@ -539,6 +539,7 @@ public List mergeSimplePolygons(@NonNull de.blau.android.Map map) throws try { delegator.lock(); delegator.getUndo().createCheckpoint(map.getContext().getString(R.string.undo_action_move_tags)); + delegator.recordImagery(map); } finally { delegator.unlock(); }