[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
This commit is contained in:
Nikita Pavlenko
2024-11-21 15:32:32 +01:00
committed by intellij-monorepo-bot
parent 0de98c3d59
commit e7a03c5360

View File

@@ -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());
}