Problem 1391

Summary: Geant4.9.6b01: File menu is behind user menus in Qt session
Product: Geant4 Reporter: Alexey <alexey.radkov>
Component: interfacesAssignee: garnier
Status: RESOLVED FIXED    
Severity: trivial CC: garnier
Priority: P5    
Version: other   
Hardware: All   
OS: All   
Attachments: Wrong File menu position

Description Alexey 2012-11-15 10:34:43 CET
Created attachment 192 [details]
Wrong File menu position

If in a qt session i use /gui/addMenu command then menu File is always at the last position (see attached image): this happens for all examples shipped with Geant4 sources that support Qt UI.

What's wrong:

G4UIQt::AddMenu() use

fMainWindow->menuBar()->insertMenu(fMainWindow->menuBar()->actions().last(),fileMenu);

This will always insert new menu items just before the last one (normally File), not behind the last item!

Solution:

Use

fMainWindow->menuBar()->addMenu(fileMenu);

instead. This fixes the issue.

Cheers, Alexey.
Comment 1 garnier 2014-05-09 15:10:43 CEST
Fixed in Geant4.9.6