From e7a03c5360d4209ff706ea2f80f85c41a0c85750 Mon Sep 17 00:00:00 2001 From: Nikita Pavlenko Date: Thu, 21 Nov 2024 15:32:32 +0100 Subject: [PATCH] [PyCharm] Debug (feat): Added possibility to copy images from image viewer opened via "Show image" from variables view. #PY-77576 Fixed (cherry picked from commit 44e5cf29fde086ab796d138fcf99d76f5a662a99) IJ-CR-153313 GitOrigin-RevId: 8e761e95f73b91bc2e09946157c895298785e708 --- images/src/org/intellij/images/editor/impl/ImageEditorUI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/src/org/intellij/images/editor/impl/ImageEditorUI.java b/images/src/org/intellij/images/editor/impl/ImageEditorUI.java index f7984e6d4900..53052302785e 100644 --- a/images/src/org/intellij/images/editor/impl/ImageEditorUI.java +++ b/images/src/org/intellij/images/editor/impl/ImageEditorUI.java @@ -596,6 +596,7 @@ final class ImageEditorUI extends JPanel implements UiDataProvider, CopyProvider @Override public void uiDataSnapshot(@NotNull DataSink sink) { + sink.set(PlatformDataKeys.COPY_PROVIDER, this); sink.set(DATA_KEY, editor != null ? editor : this); if (editor == null) return; Project project = editor.getProject(); @@ -604,7 +605,6 @@ final class ImageEditorUI extends JPanel implements UiDataProvider, CopyProvider sink.set(CommonDataKeys.PROJECT, project); sink.set(CommonDataKeys.VIRTUAL_FILE, file); sink.set(CommonDataKeys.VIRTUAL_FILE_ARRAY, new VirtualFile[]{file}); - sink.set(PlatformDataKeys.COPY_PROVIDER, this); if (copyPasteSupport != null) { sink.set(PlatformDataKeys.CUT_PROVIDER, copyPasteSupport.getCutProvider()); }