Closed carshadi closed 1 year ago
It is a good idea. A couple of notes:
SNT was designed so that its shortcuts do not collide with those of ImageJ. SNT hotkeys do not require holding down ⌃ Ctrl / ⌘ .
We are already using S for the cursor snapping. So S alone will not work as-is. Alternatively, we could use Shift+S, but Shift+key combos feel unexpected!? Ctrl/Cmd+ S is such a universal keystroke that it would be a pity not to use it?
@tferr I moved it to QueueJumpingKeyListener
and it seems to work. It overrides the ImageJ "Save As Tiff..." prompt when triggered from the canvas, but not from the main ImageJ dialog, which seems reasonable to me. Having the Path Manger selected now doesn't trigger the save, which I guess is OK?
It would be convenient to press CTRL+S and have the save traces dialog appear. As a rough prototype, I added a key binding to the
PathManagerUI
JScrollPane
which listens for CTRL+S when the window containing the scroll pane is in focus (i.e., when any component ofPathManagerUI
is selected), see https://github.com/morphonets/SNT/commit/3e79044d8cb8d1a541f2ba5b7bf46e4ce4eae15aI would pull out the anonymous
AbstractAction
into it's own class, which could then be used by bothSNTUI
andPathManagerUI
for saving traces. It seems to work well enough, but I worry that users may get confused since when the image is in focus, CTRL+S opens the image saving dialog instead. They would need to remember to click the Path Manager UI each time.It would probably also make sense to add a listener to the main SNT dialog as well, @tferr what do you think?