Ticket #2188 (closed: fixed)

Opened 10 years ago

Last modified 5 years ago

SANS: code restructure breaks the HFIR interface menu item

Reported by: Mathieu Doucet Owned by: Mathieu Doucet
Priority: minor Milestone: Iteration 27
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Michael Whitty

Description

The application looks for the HFIR_interface.py file in the wrong place.

Change History

comment:1 Changed 10 years ago by Mathieu Doucet

The problem only appears for developers, not with MantidPlot installed using the installers. MantidPlot keeps track of what items have been added or deleted from the Interfaces menu. For python interfaces, the path to the python script that launches the interface is made persistent using QSettings. Since the script has moved since the code restructure, MantidPlot won't find it if it has already been added using an old version of MantidPlot.

Fix: the application should remove and try re-adding the menu item if a script is not found at startup. This should be done in ApplicationWindow::readSettings().

In the meantime, developers can removed the HFIR_reduction.py line from the CustomScripts section of ~/.config/ISIS/MantidPlot.conf. Also make sure HFIR_reduction.py is not in the RemovedInterfaces list in the same section.

comment:2 Changed 10 years ago by Nick Draper

  • Status changed from new to assigned
  • Owner set to Mathieu Doucet

comment:3 Changed 10 years ago by Mathieu Doucet

  • Status changed from assigned to accepted

comment:4 Changed 10 years ago by Mathieu Doucet

(In [9199]) Problem with PyQt custom interfaces changing paths should now be fixed. Re #2188

comment:5 Changed 10 years ago by Mathieu Doucet

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

Here's how to test this ticket:

1- Close MantidPlot

2- Edit ~/.config/ISIS/MantidPlot.conf and put garbage in the file path on the following line:

Interfaces\HFIR_Reduction=/home/mantid/workspace/mantid/Code/Mantid/Scripts//HFIR_ReductionGARBAGE.py

3- Restart MantidPlot, go in the Interfaces top menu and pick HFIR_Reduction.

Outcome:

  • The HFIR_Reduction UI should start
  • The line that you have modified in MantidPlot.conf should now have a file path that points to HFIR_Reduction.py (where the file actually sits, with the garbage removed).

comment:6 Changed 10 years ago by Michael Whitty

  • Status changed from verify to verifying
  • Tester set to Michael Whitty

comment:7 Changed 10 years ago by Michael Whitty

  • Status changed from verifying to closed

works as described, tested in [9522]

comment:8 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 3035

Note: See TracTickets for help on using tickets.