Commit ad86799c authored by Yan's avatar Yan
Browse files

Fix - decimal separator

Fixed bug related to conversion from str to float
parent ce5a9c9e
......@@ -14,7 +14,7 @@ from . import zcetools_help
from . import reactivitytools
__version__ = "0.0.44"
__version__ = "0.0.45"
__all__ = ['config', 'datatools', 'docks', 'drltools', 'datasets',
......
#!/usr/bin/env python3
from PyQt5 import QtGui
from PyQt5 import QtCore
import matplotlib
import numpy as np
import prasopes.datatools as dt
......@@ -15,6 +16,7 @@ def floatize(table, row, column, nonneg=True):
float, if the text is not acceptable as float, returns zero"""
imptext = table.item(row, column).text().replace(",", ".")
validator = QtGui.QDoubleValidator()
validator.setLocale(QtCore.QLocale(151))
if nonneg:
validator.setBottom(0)
status = validator.validate(imptext, 0)[0]
......
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