Ticket #8891 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Mantid 2D plot label issues

Reported by: Samuel Jackson Owned by: Federico M Pouzols
Priority: major Milestone: Release 3.3
Component: GUI Keywords: NewStarter
Cc: Blocked By:
Blocking: Tester: Wenduo Zhou

Description

Unsure if these have been flagged before but I found a couple of issues in 2D plotting during unscripted testing:

  • Once a label is added I can't seem to move it.
  • I also can't edit it (presumably by double clicking).
  • Or delete it! (Delete key and using right click)

But... it looks like I can edit, move and delete the plot key.

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 Nick Draper

  • Keywords NewStarter added

comment:3 Changed 6 years ago by Nick Draper

  • Owner changed from Anyone to Federico M Pouzols
  • Milestone changed from Backlog to Release 3.3

comment:4 Changed 6 years ago by Federico M Pouzols

  • Status changed from assigned to inprogress

A few observations/hints to narrow this down, as at some point I couldn't reproduce the issue:

  • Remove the legend => labels work fine.

But if the legend is around:

  • If you click on a label, both the label and the legend are selected. If you've added several legends, the last legend is the one that gets selected together with the label. This also applies to the "old" legends once you have more than one legend.
  • The labels don't get their proper context menu, only the legend. But if you select a label and then right click on the legend (which gets selected at the same time) then the actions apply on the label!

So there seems to be some sort of mess with the handle/coordinates of the legend.

This ticket seems very similar to #8851, if not pretty much the same.

comment:5 Changed 6 years ago by Federico Montesino Pouzols

Prevent mix up of legend/label selection, refs #8891 and #8851

Make sure the target of new SelectionMoveResizer is the actual legend/label being clicked.

Changeset: d6e3405c514a34cb48de2a142b8208c24b054364

comment:6 Changed 6 years ago by Federico Montesino Pouzols

Avoid warning: unused parameter, re #8891 and #8851

Changeset: db385093f5c9d97fbc0fb8786764a7f6579e950c

comment:7 Changed 6 years ago by Federico M Pouzols

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

This seems fixed. Now it's possible to select, move, edit (dbl clicking), get a proper context menu, etc. for all labels and legends.

In short, there was a mix up of click events and selections on different labels and legends.

To test:

  • Load your favorite example project file, and from any workspace do a "Plot Spectrum", or alternatively use plotBin, plot2D, etc. from the script interpreter.
  • Add text labels, try to select them, move them around, edit them, right click on them to get their context menu, etc. You can also add multiple legends (rightmost button in the tool bar), move them around and play with their properties.

Nit picky note: if we wanted to be picky about usability, there's an inconsistency in how select/deselect works in qti plots. When you select a label or legend, and then click on something else, this first click will deselect the previous selection. Then you need a second click to select that something else. This is different from the select/deselect behavior with for example line or arrow markers. If you click and select an arrow and then click on another arrow, this single click will deselect the first one and select the second one. Not sure if this is intentional, I'd guess it's not. This inconsistency is due to the way the whole qti lib is (inconsistently) organized.

comment:8 Changed 6 years ago by Dan Nixon

  • Status changed from verify to reopened
  • Resolution fixed deleted

It appears this has not been merged into develop yet.

Before a ticket can be tested it must be submitted to the build servers using git checkbuild.

comment:9 Changed 6 years ago by Federico M Pouzols

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

Sorry for the confusion. Here it comes again...

comment:10 Changed 6 years ago by Wenduo Zhou

  • Status changed from verify to verifying
  • Tester set to Wenduo Zhou

comment:11 Changed 6 years ago by Wenduo Zhou

The label can be moved, edited and deleted now. Ticket is closed then.

comment:12 Changed 6 years ago by Wenduo Zhou

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/bugfix/8891_2d_plot_label_issues'

Full changeset: 5414c6de7d648e6bf3c1c71690f36568eaa5c270

comment:13 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9735

Note: See TracTickets for help on using tickets.