Commit f640b043 authored by Yan's avatar Yan

Improved stability

* errors caused by insufficient memory stack during start resolved by
  single-threading.
parent 803f0281
......@@ -13,7 +13,7 @@ from . import zcetools_help
from . import reactivitytools
__version__ = "0.0.34"
__version__ = "0.0.35"
__all__ = ['config', 'datatools', 'docks', 'drltools', 'drltoos_gui', 'filetools',
......
......@@ -63,7 +63,8 @@ def show_exception_and_exit(exc_type, exc_value, tb):
sys.exit(-1)
def load_file(parent, augCanvas, update, settings, loadthread, filename=None):
def load_file(parent, augCanvas, update, settings, loadthread, filename=None,
nothreading=False):
"""populates dataset and plots it"""
directory = augCanvas.filename or settings.value("open_folder")
filename = filename or QtWidgets.QFileDialog.getOpenFileName(
......@@ -116,8 +117,11 @@ def load_file(parent, augCanvas, update, settings, loadthread, filename=None):
update.signal.emit()
error.signal.connect(lambda: QtWidgets.QMessageBox.critical(
parent, errormsg[0], errormsg[1]))
loadthread.run = runfnc
loadthread.start()
if nothreading:
runfnc()
else:
loadthread.run = runfnc
loadthread.start()
def print_graph(augCanvas):
......@@ -466,7 +470,7 @@ def main():
if len(sys.argv) == 2:
load_file(main_window, augCanvas, update, config, loadthread,
filename=sys.argv[1])
filename=sys.argv[1], nothreading=True)
else:
gt.pop_plot([], [], augCanvas.spectplot, augCanvas.ms)
gt.pop_plot([], [], augCanvas.chromplot, augCanvas.chrom)
......
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