Ticket #8452 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Fix keyboard shortcuts in the graph menu for plots

Reported by: Peter Parker Owned by: Federico M Pouzols
Priority: major Milestone: Release 3.3
Component: GUI Keywords:
Cc: Blocked By:
Blocking: Tester: Dan Nixon

Description

To reproduce:

  • Load some data and plot one or more of it's spectra.
  • Click on the plot window so that the context-sensitive "Graph" menu appears.
  • Try using the keyboard shortcuts for the various items in that menu.

I haven't tried them all, but "Add Layer" (Alt+L) and "Add Label" (Alt+T) do not work.

Change History

comment:1 Changed 7 years ago by Nick Draper

  • Status changed from new to assigned

bulk move to assigned at the into of the triage step

comment:2 Changed 6 years ago by Federico M Pouzols

  • Status changed from assigned to inprogress
  • Owner set to Federico M Pouzols

This menu may have changed over the last few months. In current versions I only see a couple of actions with keyboard shortcuts:

  • Add/Remove &Curve, shotcut (Alt-C) doesn't work
  • Add &Function, shortcut (Ctrl-Alt-F) works

Problem is: Alt-C conflicts with the main menu->&Catalog. So I think we should change the shortcut of add/remove curve to Ctrl-Alt-C and fix it.

comment:3 Changed 6 years ago by Federico M Pouzols

Well, Ctrl-Alt-C is also used but in "Go to column" which should not be an issue.

comment:4 Changed 6 years ago by Federico M Pouzols

  • Milestone changed from Backlog to Release 3.3

comment:5 Changed 6 years ago by Federico Montesino Pouzols

fix and redefine the add/remove curve action kb shortcut, re #8452

Changeset: 48c018405aea6d95080f3aa99b7fd1a7d831349b

comment:6 Changed 6 years ago by Federico M Pouzols

  • Status changed from inprogress to verify
  • Resolution set to fixed

Fixed as described in comment:2. The new keyboard shortcut for "Add/Remove Curve" is Ctrl-Alt-C.

To test, select your favorite workspaces, open spectrum plots and check that these two keyboard shortcuts work:

  • Ctrl-Alt-F: should open the add function dialog
  • Ctrl-Alt-C: should open the add/remove curve dialog

The two actions should also be visible in the context menu.

comment:7 Changed 6 years ago by Federico Montesino Pouzols

fix also translated string, re #8452

Changeset: 2dfc8e11825d26958c9815f3ddfa2e7a6641bad8

comment:8 Changed 6 years ago by Dan Nixon

  • Status changed from verify to verifying
  • Tester set to Dan Nixon

comment:9 Changed 6 years ago by Dan Nixon

  • Status changed from verifying to reopened
  • Resolution fixed deleted

There is still a conflict between Alt-I, this is both Add Image and the Interfaces menu.

comment:10 Changed 6 years ago by Federico Montesino Pouzols

  • Status changed from reopened to inprogress

more general cleaning of main menu->graph shortcute, re #8452

Changeset: 3028dc7ae5d601a66d586f9d77b1ed9f6242145e

comment:11 Changed 6 years ago by Federico M Pouzols

  • Status changed from inprogress to verify
  • Resolution set to fixed

Aha, there were more. I had only paid attention to the context menu. I updated the graph menu shortcuts more in general, also for consistency with the Ctrl+Alt+? pattern that was used for most of them. Apparently there's no one else using Ctrl+Alt+? shortcuts (except the instrument viewer that is using Ctrl+Alt+E and +R) so this should prevent conflicts.

I also updated http://www.mantidproject.org/MantidPlot:_The_Graph_Menu with some actions that were missing and the current shortcuts.

The only Alt+? shortcuts remaining are add/remove/arrange Layer: Alt+L/R/A. For now I'd leave those as they are but there's the potential for conflict in the future.

Being picky, I do not really like the Ctrl+Alt+? shortcuts, as they may clash with many other things, including common desktop shortcuts. But well, it's the most backwards compatible option. 'Shift' would be an alternative, but Ctrl+Shift+M and Ctrl+Shift+A are being used in View->Workspaces/Algorithms.

The context menu only shows a couple of add/remove actions. That might be fine, but the plot toolbar does not seem very consistent to me. Why are "add function" and "add legend" shown but not "add curve", which is visible in the graph menu and the context menu? TimeStamp and Image are also missing from the tool bar. This may have been intentional but it looks like things just diverged over time. There are also inconsistencies in the "data" actions of this tool bar. I think I'm going to open a low priority maintenance ticket for the graph tool bar actions. Shortcuts in other entries of the main menu could also benefit from a bit of cleaning/harmonization work.

To test: please double check that all the shortcuts of the graph menu work (and also the subset of actions included in the graph context menu) and that they're correctly documented in http://www.mantidproject.org/MantidPlot:_The_Graph_Menu.

comment:12 Changed 6 years ago by Dan Nixon

  • Status changed from verify to verifying

comment:13 Changed 6 years ago by Dan Nixon

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/bugfix/8452_keyborad_shortcuts_plot_graph_menu'

Full changeset: 4a1e1c4a04075912ceb4daf48911b7108b89fa8c

comment:14 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9296

Note: See TracTickets for help on using tickets.