Commit 3297b611 authored by Yan's avatar Yan
Browse files

Browsing filetree does not stuck the rest of SW

* putted QFileSystemModel into separate thread
* minor glitch fix of DRLtools
parent 8ccb50ef
......@@ -310,9 +310,13 @@ def main():
toolBar.addSeparator()
toolBar.addAction(autozoomy)
#fileModel gots stuck sometimes, better give it a separate thread
#it complains in separate thread but work as should, maybe fix later..
fileModel = QtWidgets.QFileSystemModel()
treedockThread = QtCore.QThread()
treedockThread.start()
fileModel.setRootPath('')
fileModel.moveToThread(treedockThread)
activeDir = fileModel.index(config.value("open_folder"))
treeview = QtWidgets.QTreeView()
treeview.setModel(fileModel)
......
......@@ -72,7 +72,7 @@ def update_profile(pt, row, dataset):
xmin, xmax = limits[widest][0]
xex = max((xmax-xmin)*0.25,0.20)
spectrum.set_xlim(xmin-xex, xmax+xex)
ymax = max([lim[1] for lim in limits])
ymax = max([lim[1] for lim in limits],1)
spectrum.set_ylim(ymax*-0.1, ymax*1.2)
spectrum.figure.canvas.draw()
......
Supports Markdown
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