forked from npshub/mantid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Elemental_Analysis_2.py
36 lines (34 loc) · 1.43 KB
/
Elemental_Analysis_2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
# pylint: disable=invalid-name
from Muon.GUI.ElementalAnalysis2.elemental_analysis import ElementalAnalysisGui
from qtpy import QtCore
from Muon.GUI.Common.usage_report import report_interface_startup
Name = "Elemental_Analysis_2"
if 'elemental_analysis_2' in globals():
elemental_analysis = globals()['elemental_analysis_2']
# If the object is deleted in the C++ side it can still exist in the
# python globals list. The try catch block below checks for this.
try:
is_hidden = elemental_analysis.isHidden()
except RuntimeError:
is_hidden = True
if not is_hidden:
elemental_analysis.setWindowState(
elemental_analysis.windowState(
) & ~QtCore.Qt.WindowMinimized | QtCore.Qt.WindowActive)
elemental_analysis.activateWindow()
else:
elemental_analysis = ElementalAnalysisGui()
report_interface_startup(Name)
elemental_analysis.resize(700, 700)
elemental_analysis.show()
else:
elemental_analysis = ElementalAnalysisGui()
report_interface_startup(Name)
elemental_analysis.resize(700, 700)
elemental_analysis.show()