1
0
forked from IPKM/nmreval
closes issue #177
This commit is contained in:
Dominik Demuth 2023-12-13 19:10:01 +00:00
parent a0c07231c3
commit af0e0fc76f
4 changed files with 10 additions and 4 deletions

View File

@ -199,4 +199,4 @@ class PointSelectWidget(QtWidgets.QWidget, Ui_Form):
@QtCore.pyqtSlot(int, name='on_graph_checkbox_stateChanged')
def changed_state(self, checked):
self.graph_combobox.setEnabled(checked!=QtCore.Qt.Checked)
self.graph_combobox.setEnabled(checked != QtCore.Qt.Checked)

View File

@ -211,7 +211,7 @@ class QAsciiReader(QtWidgets.QDialog, Ui_ascii_reader):
col_header.append(i)
if y is not None and col_header is not None:
col_header = [col_header[i] for i in range(len(col_header)) if i in y]
col_header = [col_header[i] for i in range(len(col_header))]
try:
ret_dic = self.reader.export(

View File

@ -259,8 +259,11 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow):
filedialog.set_graphs(self.management.graphs.list())
filedialog.exec()
fname = filedialog.selectedFiles()
accepted = filedialog.exec()
if accepted:
fname = filedialog.selectedFiles()
else:
fname = []
if fname:
self.path = Path(fname[0]).parent

View File

@ -121,6 +121,9 @@ class AsciiReader:
if y is None:
y = list(range(int(len(x) != 0), max(self.width)))
if col_names is not None:
col_names = [col_names[y_i] for y_i in y]
cols = x + y + yerr
with self.fname.open('rb') as fh:
tmp_ = re.sub(b'[;,]', b' ', fh.read())