diffpy / diffpy.pdfgui

graphical user interface for real space structure refinement to PDF
Other
18 stars 27 forks source link

fix copy-paste shortcut on the phase-configuration panel #29

Open pavoljuhas opened 6 years ago

pavoljuhas commented 6 years ago

The atom-list in the Phase Configuration panel has copy/paste functionality in the right-click context menu. The standard copy/paste shortcuts <ctrl-c>, <ctrl-v> however apply to the current phase node in the fit-tree even if it is the atom-list that is in focus.

Proposed solution: check what is in focus when handling the Copy / Paste shortcut keys.

sbillinge commented 6 years ago

This may be related to #14 so perhaps they should be handled together @chiahaoliu @pavoljuhas ? It would also be good for @dragonyanglong to be looped in since he will be working on PDFgui2.0

pavoljuhas commented 6 years ago

The descriptions are similar, but I think it is better to keep them as separate tasks. The "Phase Configuration" already has copy/paste functionality in, so this issue just needs a proper handling of shortcut keys. The Parameters page to my knowledge does not have copy/paste functions at all. I suggest Tim @chiahaoliu and I do this issue first and then proceed to #14.

sbillinge commented 6 years ago

sorry, I didn't mean to imply to merge the issues, merely that the same person work on both issues, since to fix #14 it kind of makes sense to make progress on #29 first..... It seems that this is how this is going to happen anyway, but just clarifying what I meant there....

On Tue, Nov 28, 2017 at 12:42 PM Pavol Juhas notifications@github.com wrote:

The descriptions are similar, but I think it is better to keep them as separate tasks. The "Phase Configuration" already has copy/paste functionality in, so this issue just needs a proper handling of shortcut keys. The Parameters page to my knowledge does not have copy/paste functions at all. I suggest Tim @chiahaoliu https://github.com/chiahaoliu and I do this issue first and then proceed to #14 https://github.com/diffpy/diffpy.pdfgui/issues/14.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/diffpy/diffpy.pdfgui/issues/29#issuecomment-347604196, or mute the thread https://github.com/notifications/unsubscribe-auth/AEDrUSaOgtBuAjinmglMYGlf0tb5FHQIks5s7EYPgaJpZM4QsdkL .

pavoljuhas commented 6 years ago

@chiahaoliu - Happy New Year Tim! Was there any progress with this task?

I'd like to do a minor release soon so we can have other improvements (working bugreport) out in the Anaconda version.

chiahaoliu commented 6 years ago

@pavoljuhas Happy new year!

Actually I briefly started looking into this issue but got confused somehow. Maybe you can help me with the context of this issue :)

I looked into the PhaseConfigurationPanel class and I found in the onKey method there is no clause to capture the <ctrl+c> and <ctrl+v> events. However, there is copy-paste method in the right-click event as you mentioned.

Would this be the origin of the problem? (since shortcut is not handled).

Thanks.