mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-07 20:01:33 +00:00
Merge pull request #8442 from openstreetmap/8441-move-rotate
In move/rotate cancel, check whether graph has changed before popping
This commit is contained in:
@@ -113,10 +113,10 @@ export function modeMove(context, entityIDs, baseGraph) {
|
||||
|
||||
function cancel() {
|
||||
if (baseGraph) {
|
||||
while (context.graph() !== baseGraph) context.pop();
|
||||
while (context.graph() !== baseGraph) context.pop(); // reset to baseGraph
|
||||
context.enter(modeBrowse(context));
|
||||
} else {
|
||||
context.pop();
|
||||
if (_prevGraph) context.pop(); // remove the move
|
||||
context.enter(modeSelect(context, entityIDs));
|
||||
}
|
||||
stopNudge();
|
||||
|
||||
@@ -119,7 +119,7 @@ export function modeRotate(context, entityIDs) {
|
||||
|
||||
|
||||
function cancel() {
|
||||
context.pop();
|
||||
if (_prevGraph) context.pop(); // remove the rotate
|
||||
context.enter(modeSelect(context, entityIDs));
|
||||
}
|
||||
|
||||
@@ -130,6 +130,7 @@ export function modeRotate(context, entityIDs) {
|
||||
|
||||
|
||||
mode.enter = function() {
|
||||
_prevGraph = null;
|
||||
context.features().forceVisible(entityIDs);
|
||||
|
||||
behaviors.forEach(context.install);
|
||||
|
||||
Reference in New Issue
Block a user