Commit 88e62581 authored by Yan's avatar Yan
Browse files

Improved stability

* side-thread cleaned up when closing, so program does not crash
* input sanitization in drltools floatize function
parent 51a63d62
......@@ -372,6 +372,8 @@ def main():
event, treedock, filebrowseract)
main_window.addDockWidget(QtCore.Qt.LeftDockWidgetArea, treedock)
main_window.closeEvent = lambda event: treedockThread.quit()
layout = QtWidgets.QVBoxLayout(main_widget)
layout.addWidget(toolBar)
layout.addWidget(mpl_canvas)
......
......@@ -32,7 +32,7 @@ class StretchWidget(QtWidgets.QWidget):
def floatize(table, row, column, nonneg=True):
"""grabs the tableWidgetItem and transforms its text safely to
float, if the text is not acceptable as float, returns zero"""
imptext = table.item(row, column).text()
imptext = table.item(row, column).text().replace(",",".")
validator = QtGui.QDoubleValidator()
if nonneg == True:
validator.setBottom(0)
......
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