Fix stale UI when undoing/redoing between single and multiselections (re: #7090)

This commit is contained in:
Quincy Morgan
2019-12-10 10:07:05 -05:00
parent 00e8a125e2
commit 9aa27f68c3

View File

@@ -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;
}