mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Fix stale UI when undoing/redoing between single and multiselections (re: #7090)
This commit is contained in:
@@ -77,10 +77,14 @@ export function modeSelect(context, selectedIDs) {
|
||||
});
|
||||
}
|
||||
|
||||
if (ids.length) {
|
||||
selectedIDs = ids;
|
||||
} else {
|
||||
if (!ids.length) {
|
||||
context.enter(modeBrowse(context));
|
||||
} else if ((selectedIDs.length > 1 && ids.length === 1) ||
|
||||
(selectedIDs.length === 1 && ids.length > 1)) {
|
||||
// switch between single- and multi-select UI
|
||||
context.enter(modeSelect(context, ids));
|
||||
} else {
|
||||
selectedIDs = ids;
|
||||
}
|
||||
return !!ids.length;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user