forked from IPKM/nmreval
Co-authored-by: Dominik Demuth <dominik.demuth@physik.tu-darmstadt.de> Reviewed-on: IPKM/nmreval#264
This commit is contained in:
parent
b25db92cf1
commit
c8aad904a8
@ -132,7 +132,10 @@ class QAsciiReader(QtWidgets.QDialog, Ui_ascii_reader):
|
||||
self.ascii_table.setHorizontalHeaderLabels(map(str, range(1, self.ascii_table.columnCount() + 1)))
|
||||
if self.column_checkBox.isChecked() and self.line_spinBox.isEnabled():
|
||||
header_line = self.reader.header[self.line_spinBox.value()-1]
|
||||
self.ascii_table.setHorizontalHeaderLabels(header_line.split())
|
||||
header_line = header_line.strip('\n\t\r, ')
|
||||
header_line = re.sub(r'[\t ;,]+', ';', header_line)
|
||||
|
||||
self.ascii_table.setHorizontalHeaderLabels(header_line.split(';'))
|
||||
|
||||
@QtCore.pyqtSlot(int, name='on_staggered_checkBox_stateChanged')
|
||||
def changestaggeredrange(self, state: int):
|
||||
|
@ -51,6 +51,7 @@ class QFileReader(QtCore.QObject):
|
||||
if not isinstance(fname, list):
|
||||
fname = [fname]
|
||||
|
||||
status = QtWidgets.QDialog.Accepted
|
||||
for f in fname:
|
||||
f = Path(f)
|
||||
dtype = self.guess_type(f)
|
||||
@ -61,9 +62,9 @@ class QFileReader(QtCore.QObject):
|
||||
|
||||
try:
|
||||
# If QAsciiReader.skip = True it accepts automatically and returns None
|
||||
status = r(f).exec()
|
||||
if status == QtWidgets.QDialog.Rejected and isinstance(r, QAsciiReader):
|
||||
if status == QtWidgets.QDialog.DialogCode.Rejected and isinstance(r, QAsciiReader) and self.reader['txt'].skip:
|
||||
break
|
||||
status = r(f).exec()
|
||||
|
||||
except AttributeError:
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user