Skip to content

Commit

Permalink
Refs #5442. Check the ISIS facility is set when using the Muon GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert-Whitley committed Jul 20, 2012
1 parent 935ada6 commit 6e30edc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Code/Mantid/MantidQt/CustomInterfaces/src/MuonAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "MantidGeometry/IDetector.h"
#include "MantidKernel/V3D.h"
#include "MantidKernel/Exception.h"
#include "MantidKernel/FacilityInfo.h"
#include "MantidGeometry/Instrument/XMLlogfile.h"
#include "MantidGeometry/Instrument/DetectorGroup.h"
#include "MantidKernel/cow_ptr.h"
Expand Down Expand Up @@ -3431,6 +3432,17 @@ void MuonAnalysis::closeEvent(QCloseEvent *e)
*/
void MuonAnalysis::showEvent(QShowEvent *e)
{
const std::string facility = ConfigService::Instance().getFacility().name();
if (facility != "ISIS")
{
QMessageBox::critical(this, "Unsupported facility", QString("Only the ISIS facility is supported by this interface.\n")
+ "Select ISIS as your default facility in View->Preferences...->Mantid to continue.");
m_uiForm.loadCurrent->setDisabled(true);
}
else
{
m_uiForm.loadCurrent->setDisabled(false);
}
// Hide the toolbar
if (m_uiForm.hideToolbars->isChecked() )
emit hideToolbars();
Expand Down

0 comments on commit 6e30edc

Please sign in to comment.