Ticket #7582 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

View -> Toolbars... doesn't behave sensibly

Reported by: Keith Brown Owned by: Keith Brown
Priority: minor Milestone: Release 3.2
Component: GUI Keywords:
Cc: Blocked By:
Blocking: #8940 Tester: Martyn Gigg

Description

I thinks it's a given amongst users that when you see a menu item with an ellipsis (...) after it you expect a dialogue box to appear so you can edit the options.

At present the View -> Toolbars... command opens up a context menu at the current cursor position when you click it or activate it's short-cut.

This should really either open a dialogue box, or become a fold out lower-level menu and have it's short-cut key removed.

The way it is now I thought it was clicking right through and hitting the Fit Function -> Setup menu that was right beneath that part of the menu.

Change History

comment:1 Changed 7 years ago by Keith Brown

  • Component changed from Framework to User Interface

comment:2 Changed 7 years ago by Keith Brown

  • Owner set to Keith Brown

comment:3 Changed 7 years ago by Keith Brown

  • Status changed from new to inprogress

Refs #7582 Toolbar menu now works properly

The toolbar menu in View now displays as a next level menu rather than a context menu.

Changeset: c7047122d8ae12e0e7c00b5ad06edb5e97f566bd

comment:4 Changed 7 years ago by Keith Brown

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

comment:5 Changed 7 years ago by Keith Brown

To tester:

First look at the behaviour of view->toolbars... as of 3.1, you'll notice (at least on windows) it displays as a context menu.

This fix should make it a lower-level menu rather than a context menu.

Check all the toolbars show and hide when they're toggled. When you close mantid, the same toolbars you had open are still open when you load mantid next time, as well as the checks on the toolbars menu showing checks against the right options when you Load mantid.

comment:6 Changed 7 years ago by Peter Parker

  • Status changed from verify to reopened
  • Resolution fixed deleted

Russell's reset of Develop means that this needs another git checkbuild before it can be tested.

Also, a quick code inspection has revealed that we need to fix the indentation inside the void ApplicationWindow::setToolbars() function.

comment:7 Changed 7 years ago by Keith Brown

  • Status changed from reopened to inprogress

Refs #7582 Fixed indentation

Peter mentioned indentation, fixed.

Changeset: f224e9584628ed78d7cfe2971214e4ab5bb6b9a4

comment:8 Changed 7 years ago by Keith Brown

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

indents fixed, and ticket checkbuilt

comment:9 Changed 7 years ago by Keith Brown

  • Milestone changed from Backlog to Release 3.2

comment:10 Changed 7 years ago by Martyn Gigg

  • Status changed from verify to reopened
  • Resolution fixed deleted

The rearrangement of the methods has tripped a cppcheck warning in ApplicationWindow (see here). I think it is a false positive as there is no other allocation of that pointer.

Can you change the definition of the makeToolbarsMenu method on line 16683 of ApplicationWindow so that it reads

void ApplicationWindow::makeToolbarsMenu()
// cppcheck-suppress publicAllocationError
{

The comment is supposed to be before the opening { so is not a typo although does look odd.

comment:11 Changed 7 years ago by Martyn Gigg

  • Blocking 8940 added

comment:12 Changed 7 years ago by Keith Brown

  • Status changed from reopened to inprogress

Refs #7582 supressed CppCheck warning

The cppcheck warning was a false positive as the varaible wasn't allocated before.

I think the reason cppcheck didn't like it is because i allocate it in a function.

Changeset: 6303f7b5c83c17fd36368a054b07b58bc56b3e71

comment:13 Changed 7 years ago by Keith Brown

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

comment:14 Changed 7 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester set to Martyn Gigg

comment:15 Changed 7 years ago by Martyn Gigg

Having had a proper look at the code I think the cppcheck error actually comes from the fact that if the method makeToolbarsMenu were called twice then it would not deallocate the ones that had been allocated originally.

However, the same pattern is used in the initToolbars method and that doesn't show an issue so I think it's okay as it is as it is at least consistent with the rest of the code.

comment:16 Changed 7 years ago by Martyn Gigg

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/7582_toolbar_menu'

Full changeset: 7c3ade4c78384393e30455f4fc2a028c8ae36c75

comment:17 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8427

Note: See TracTickets for help on using tickets.