[1.3b50] Show dialog when CTRL-dragging in from Library

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: [1.3b50] Show dialog when CTRL-dragging in from Library

Post by Azhrei »

Tyren wrote:So I assume on Mac that you have a key you can press to make it do the copy action. On PC it's CTRL. *shrug* I'm interested to see how this works on Mac too.
Good question about the keystroke. I had to try it out in the file manager (Finder) to see. Turns out that the Alt/Option key (it's labeled as both) acts as a copy when dragging and dropping files and the default is move.

Within MapTool I can left-drag the token and it works like it always did. When I hold down the Shift key, the plus sign that indicates COPY goes away. But the token doesn't drop. The same thing happens when I use a right-drag (with any combination of modifier keys).

I'll play with it a bit. The problem is that dropping it the token is calling the DropTarget's canImport() method and it's returning false. I just need to figure out how that is being implemented...

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: [1.3b50] Show dialog when CTRL-dragging in from Library

Post by Azhrei »

No luck. I've tried a variety of modifier key combinations and none of them work to prevent the dialog box. :(

It appears that the dropAction is set to "1" (COPY) instead of "3" (MOVE). I think the reason for this has to do with custom Swing components not supporting MOVE by default (what does it mean to MOVE data from a JList, for example?) and so the DragGestureRecognizer calls its internal TransferHandler to ask it if the drop action desired by the user is okay and the answer is always "no".

Since it works on the Windows platform, I can't tell if the Windows platform has a bug and it shouldn't be working, or if the OSX platform has the bug and it should be working. :?:

Since the canImport() method is only implemented in the TransferHandler, it would require some code to work around this, I think. I don't judge it important enough, so I don't plan to work on it. That said, if I can find an easy solution (maybe directly examining the modifier keys pressed when the mouse is released?), I may try to find a patch.

User avatar
Tyren
Giant
Posts: 119
Joined: Tue Feb 10, 2009 12:38 pm
Location: Snohomish, WA

Re: [1.3b50] Show dialog when CTRL-dragging in from Library

Post by Tyren »

So, can we send this to Trevor to check in?

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: [1.3b50] Show dialog when CTRL-dragging in from Library

Post by Azhrei »

By all means. :)

User avatar
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

Re: [1.3b50] Show dialog when CTRL-dragging in from Library

Post by trevor »

This is addressed in 1.3b54
Dreaming of a 1.3 release

Post Reply

Return to “Resolved”