forked from IPKM/nmreval
parent
a0c07231c3
commit
af0e0fc76f
@ -199,4 +199,4 @@ class PointSelectWidget(QtWidgets.QWidget, Ui_Form):
|
|||||||
|
|
||||||
@QtCore.pyqtSlot(int, name='on_graph_checkbox_stateChanged')
|
@QtCore.pyqtSlot(int, name='on_graph_checkbox_stateChanged')
|
||||||
def changed_state(self, checked):
|
def changed_state(self, checked):
|
||||||
self.graph_combobox.setEnabled(checked!=QtCore.Qt.Checked)
|
self.graph_combobox.setEnabled(checked != QtCore.Qt.Checked)
|
||||||
|
@ -211,7 +211,7 @@ class QAsciiReader(QtWidgets.QDialog, Ui_ascii_reader):
|
|||||||
col_header.append(i)
|
col_header.append(i)
|
||||||
|
|
||||||
if y is not None and col_header is not None:
|
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:
|
try:
|
||||||
ret_dic = self.reader.export(
|
ret_dic = self.reader.export(
|
||||||
|
@ -259,8 +259,11 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow):
|
|||||||
|
|
||||||
filedialog.set_graphs(self.management.graphs.list())
|
filedialog.set_graphs(self.management.graphs.list())
|
||||||
|
|
||||||
filedialog.exec()
|
accepted = filedialog.exec()
|
||||||
fname = filedialog.selectedFiles()
|
if accepted:
|
||||||
|
fname = filedialog.selectedFiles()
|
||||||
|
else:
|
||||||
|
fname = []
|
||||||
|
|
||||||
if fname:
|
if fname:
|
||||||
self.path = Path(fname[0]).parent
|
self.path = Path(fname[0]).parent
|
||||||
|
@ -121,6 +121,9 @@ class AsciiReader:
|
|||||||
if y is None:
|
if y is None:
|
||||||
y = list(range(int(len(x) != 0), max(self.width)))
|
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
|
cols = x + y + yerr
|
||||||
with self.fname.open('rb') as fh:
|
with self.fname.open('rb') as fh:
|
||||||
tmp_ = re.sub(b'[;,]', b' ', fh.read())
|
tmp_ = re.sub(b'[;,]', b' ', fh.read())
|
||||||
|
Loading…
Reference in New Issue
Block a user