fix(label): selected path
This commit is contained in:
@@ -1511,6 +1511,7 @@ const LabelPage = ({
|
||||
|
||||
const restoreDrawShortcutSnapshot = useCallback(() => {
|
||||
useKeyboardStore.getState().setDrawAction("none")
|
||||
useKeyboardStore.getState().setSelectedObjectEditTarget(null)
|
||||
|
||||
const snapshot = drawShortcutSnapshotRef.current
|
||||
if (!snapshot) return
|
||||
@@ -1562,6 +1563,7 @@ const LabelPage = ({
|
||||
|
||||
setActiveOperation(selectedContext.operationId)
|
||||
usePaperStore.getState().setContinuePolygonTarget(null)
|
||||
useKeyboardStore.getState().setSelectedObjectEditTarget(selectedContext)
|
||||
setEditMode(true)
|
||||
setDrawOption("default")
|
||||
useKeyboardStore.getState().setDrawAction(mode)
|
||||
@@ -1715,6 +1717,7 @@ const LabelPage = ({
|
||||
setPressA(false)
|
||||
setActiveOperation(selectedContext.operationId)
|
||||
useKeyboardStore.getState().setDrawAction("none")
|
||||
useKeyboardStore.getState().setSelectedObjectEditTarget(null)
|
||||
usePaperStore.getState().setContinuePolygonTarget({
|
||||
imageId: selectedContext.imageId,
|
||||
operationId: selectedContext.operationId,
|
||||
@@ -2367,6 +2370,7 @@ const LabelPage = ({
|
||||
useEffect(() => {
|
||||
useKeyboardStore.getState().setCopyDataIds([])
|
||||
useKeyboardStore.getState().setDrawAction("none")
|
||||
useKeyboardStore.getState().setSelectedObjectEditTarget(null)
|
||||
usePaperStore.getState().setContinuePolygonTarget(null)
|
||||
drawShortcutSnapshotRef.current = null
|
||||
}, [activeImage])
|
||||
|
||||
Reference in New Issue
Block a user