Skip to content
Snippets Groups Projects
Commit d1504703 authored by Gigg, Martyn Anthony's avatar Gigg, Martyn Anthony
Browse files

Fix issue with ORNL SANS menu opening DGS interface. Refs #6411

parent f30ae72f
No related branches found
No related tags found
No related merge requests found
...@@ -122,31 +122,37 @@ class ReductionGUI(QtGui.QMainWindow, ui.ui_reduction_main.Ui_SANSReduction): ...@@ -122,31 +122,37 @@ class ReductionGUI(QtGui.QMainWindow, ui.ui_reduction_main.Ui_SANSReduction):
# Clean up the widgets that have already been created # Clean up the widgets that have already been created
self.tabWidget.clear() self.tabWidget.clear()
self.progress_bar.hide() self.progress_bar.hide()
if self._instrument == '' or self._instrument is None:
if IS_IN_MANTIDPLOT:
from mantid.kernel import ConfigService
c = ConfigService.Instance()
facility = str(c.getFacility())
if facility in INSTRUMENT_DICT.keys():
instr = str(c.getFacility().instrument(""))
instr = instr.replace("-","")
if instr in INSTRUMENT_DICT[facility].keys():
self._instrument = instr
# If we still can't find an instrument, show the
# instrument selection dialog
if self._instrument == '' or self._instrument is None:
self._change_instrument()
return
else:
self._change_instrument()
return
if self._instrument == '' or self._instrument is None: if self._instrument == '' or self._instrument is None:
self.close() self._change_instrument()
self._quit_asap = True
return return
# Commented out to solve a bug where setting ARCS as your default
# instrument means you get the DGS interface when clicking ORNL_SANS..
# if self._instrument == '' or self._instrument is None:
# if IS_IN_MANTIDPLOT:
# from mantid.kernel import ConfigService
# c = ConfigService.Instance()
# facility = str(c.getFacility())
# if facility in INSTRUMENT_DICT.keys():
# instr = str(c.getFacility().instrument(""))
# instr = instr.replace("-","")
# if instr in INSTRUMENT_DICT[facility].keys():
# self._instrument = instr
#
# # If we still can't find an instrument, show the
# # instrument selection dialog
# if self._instrument == '' or self._instrument is None:
# self._change_instrument()
# return
# else:
# self._change_instrument()
# return
#
# if self._instrument == '' or self._instrument is None:
# self.close()
# self._quit_asap = True
# return
self._update_file_menu() self._update_file_menu()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment