mirror of
https://github.com/Azornes/Comfyui-LayerForge.git
synced 2026-03-21 20:52:12 -03:00
Fix focus/modifier issues and improve multi-layer selection UX
This commit is contained in:
@@ -123,6 +123,26 @@ export class CanvasLayersPanel {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
this.deleteSelectedLayers();
|
||||
return;
|
||||
}
|
||||
// Handle Ctrl+C/V for layer copy/paste when panel has focus
|
||||
if (e.ctrlKey || e.metaKey) {
|
||||
if (e.key.toLowerCase() === 'c') {
|
||||
if (this.canvas.canvasSelection.selectedLayers.length > 0) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
this.canvas.canvasLayers.copySelectedLayers();
|
||||
log.info('Layers copied from panel');
|
||||
}
|
||||
}
|
||||
else if (e.key.toLowerCase() === 'v') {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (this.canvas.canvasLayers.internalClipboard.length > 0) {
|
||||
this.canvas.canvasLayers.pasteLayers();
|
||||
log.info('Layers pasted from panel');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
log.debug('Panel structure created');
|
||||
|
||||
Reference in New Issue
Block a user