Open likelikeslike opened 1 month ago
Reproducable, thanks
Can be fixed by adding this line
sequences: keyMap[key]?.sequences ?? updatedComponentShortcuts[key].sequences,
to label-list.tsx in the below useEffect
useEffect(() => {
const updatedComponentShortcuts = JSON.parse(JSON.stringify(componentShortcuts));
for (const [index, labelID] of Object.entries(keyToLabelMapping)) {
if (labelID) {
const labelName = labels.find((label: any) => label.id === labelID)?.name;
const key = makeKey(+index);
updatedComponentShortcuts[key] = {
...updatedComponentShortcuts[key],
nonActive: false,
name: `Switch label to ${labelName}`,
description: `Changes the label to ${labelName} for the activated
object or for the next drawn object if no objects are activated`,
sequences: keyMap[key]?.sequences ?? updatedComponentShortcuts[key].sequences,
};
}
}
registerComponentShortcuts(updatedComponentShortcuts);
}, [labels]);
Actions before raising this issue
Steps to Reproduce
Switch label to xxx
under theObjects sidebar
to a new key combination.Expected Behavior
After saving this change, the shortcut works and remains active even after refreshing the page. I have tested some shortcuts under
General
andAnnotation page
, and they function properly without resetting to the default settings.Possible Solution
Should the same logic for shortcuts under General be applied here as well?
Context
No response
Environment