Commit ce5a9c9e authored by Yan's avatar Yan
Browse files

Fixes after last patch

* at least a bit of code-checking - prevention from crashes
parent 4daf967e
......@@ -14,7 +14,7 @@ from . import zcetools_help
from . import reactivitytools
__version__ = "0.0.43"
__version__ = "0.0.44"
__all__ = ['config', 'datatools', 'docks', 'drltools', 'datasets',
......
......@@ -44,6 +44,12 @@ def export_dial(augCanvas, grph):
def main_window(parent, augCanvas, update_signal):
if not augCanvas.ds or isinstance(augCanvas.ds, ds.ThermoRawDataset):
QtWidgets.QMessageBox.warning(
parent, "MOB GUI",
"No spectrum opened, or file format is not supported,"
"nothing to display")
return
reactlabels = dict(name="", xlabel="$1/K_0 (Vs/cm^2)\ \\it→$",
ylabel="$Intensity\ \\it→$", annotation=[], texts=[],
ancx=5, ancy=3)
......@@ -56,8 +62,15 @@ def main_window(parent, augCanvas, update_signal):
QtWidgets.QDialog.closeEvent(widget, event)
def update_fnc():
mt.pop_dial(dialspect, ionstable, reactlabels,
augCanvas.ds.get_mobilogram)
if not augCanvas.ds or isinstance(augCanvas.ds, ds.ThermoRawDataset):
QtWidgets.QMessageBox.warning(
parent, "MOB GUI",
"No spectrum opened, or file format is not supported,"
"nothing to display")
return
else:
mt.pop_dial(dialspect, ionstable, reactlabels,
augCanvas.ds.get_mobilogram)
dial_widget = QtWidgets.QDialog(
parent, windowTitle='Mobilogram')
......
......@@ -43,6 +43,12 @@ def export_dial(augCanvas, grph):
def main_window(parent, augCanvas, update_signal):
if not augCanvas.ds or isinstance(augCanvas.ds, ds.ThermoRawDataset):
QtWidgets.QMessageBox.warning(
parent, "MSMOB GUI",
"No spectrum opened, or file format is not supported,"
"nothing to display")
return
reactlabels = dict(name="", xlabel="$m/z\ \\it→$",
ylabel="$Intensity\ \\it→$", annotation=[], texts=[],
ancx=5, ancy=3)
......@@ -55,8 +61,15 @@ def main_window(parent, augCanvas, update_signal):
QtWidgets.QDialog.closeEvent(widget, event)
def update_fnc():
mt.pop_dial(dialspect, ionstable, reactlabels,
augCanvas.ds.get_ms_onmob)
if not augCanvas.ds or isinstance(augCanvas.ds, ds.ThermoRawDataset):
QtWidgets.QMessageBox.warning(
parent, "MSMOB GUI",
"No spectrum opened, or file format is not supported,"
"nothing to display")
return
else:
mt.pop_dial(dialspect, ionstable, reactlabels,
augCanvas.ds.get_ms_onmob)
dial_widget = QtWidgets.QDialog(
parent, windowTitle='m/z - mobility')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment