feat(ui): select layer when dropping image on it to replace its data

This commit is contained in:
psychedelicious
2024-09-13 13:16:34 +10:00
parent 8506d98f34
commit eafd3d1ec7

View File

@@ -5,6 +5,7 @@ import { selectDefaultControlAdapter } from 'features/controlLayers/hooks/addLay
import {
controlLayerAdded,
entityRasterized,
entitySelected,
ipaImageChanged,
rasterLayerAdded,
rgIPAdapterImageChanged,
@@ -127,6 +128,7 @@ export const addImageDroppedListener = (startAppListening: AppStartListening) =>
const imageObject = imageDTOToImageObject(activeData.payload.imageDTO);
const { x, y } = selectCanvasSlice(state).bbox.rect;
dispatch(entityRasterized({ entityIdentifier, imageObject, position: { x, y }, replaceObjects: true }));
dispatch(entitySelected({ entityIdentifier }));
return;
}