Tom94/tev

Ctrl+C to copy an image is unreliable

tomasiser opened this issue ยท 6 comments

Hi there,

I've been using tev for many years now, and one thing that is frustrating and puzzling is how exactly Ctrl+C is being handled. In some cases, it actually copies the image buffer to clipboard, and I can paste it to other applications, e.g., here to GitHub to paste an image. Sometimes, though, it only copies the path string of the image file, e.g., C:\Users\tomas\image.exr.

How exactly is Ctrl+C being handled in tev, and how could we fix the behavior?

Thanks a lot!

Tom94 commented

Hi, Ctrl+C copies the image itself if you previously clicked on the canvas region and it copies the path if you previously clicked on the path (in the image list to the left). If you haven't clicked anywhere after opening tev, it'll copy the image.

I see, thanks, I found the relevant part of the code in ImageViewer.cpp, lines 711-744. So it seems that mImageScrollContainer->focused() is the deciding factor.

It's hard to reproduce properly, but I swear that many times even when I click into the canvas, Ctrl+C is not copying the image and it copies the path instead.

I will try to use tev with the command line open so I can see the log messages.

If I don't manage to reproduce it systematically, we can close this issue

I feel the same about Ctrl+C sometimes. Now when I want to copy the image, I click 3x on the canvas and press 3x Ctrl+C. Works so far ๐Ÿ˜…

Tom94 commented

Given that 3 power users (also counting @diiigle since he reacted) run into this, I wouldn't mind changing the behavior such that Ctrl+C always copies the image and Shift+Ctrl+C always copies the path.

Any objections / contrary opinions from someone watching?

First, thanks for counting me as a power user ๐Ÿ˜

In my opinion, the current behavior is OK, but I would welcome having Ctrl+Shift+C copying the path and Ctrl+C the image.

I actually believe that it could be less of an issue with Tev, but more of a mismatch between expectation and reality about whether Tev's canvas is focused. It often happens to me that Tev is showing on another screen, and I did some Alt+Tabs hoping to get it in focus but not actually succeeding, causing the subsequent Ctrl+C to fail.

Tom94 commented

Asked around locally and it seems everyone I talk to has the same experience, so I went ahead with the change. From now on Ctrl+C always copies the image and Ctrl+Shift+C copies the path.