262-column-header (#264); closes #262
All checks were successful
Build AppImage / Explore-Gitea-Actions (push) Successful in 1m27s
All checks were successful
Build AppImage / Explore-Gitea-Actions (push) Successful in 1m27s
Co-authored-by: Dominik Demuth <dominik.demuth@physik.tu-darmstadt.de> Reviewed-on: #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)))
|
self.ascii_table.setHorizontalHeaderLabels(map(str, range(1, self.ascii_table.columnCount() + 1)))
|
||||||
if self.column_checkBox.isChecked() and self.line_spinBox.isEnabled():
|
if self.column_checkBox.isChecked() and self.line_spinBox.isEnabled():
|
||||||
header_line = self.reader.header[self.line_spinBox.value()-1]
|
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')
|
@QtCore.pyqtSlot(int, name='on_staggered_checkBox_stateChanged')
|
||||||
def changestaggeredrange(self, state: int):
|
def changestaggeredrange(self, state: int):
|
||||||
|
@ -51,6 +51,7 @@ class QFileReader(QtCore.QObject):
|
|||||||
if not isinstance(fname, list):
|
if not isinstance(fname, list):
|
||||||
fname = [fname]
|
fname = [fname]
|
||||||
|
|
||||||
|
status = QtWidgets.QDialog.Accepted
|
||||||
for f in fname:
|
for f in fname:
|
||||||
f = Path(f)
|
f = Path(f)
|
||||||
dtype = self.guess_type(f)
|
dtype = self.guess_type(f)
|
||||||
@ -61,9 +62,9 @@ class QFileReader(QtCore.QObject):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
# If QAsciiReader.skip = True it accepts automatically and returns None
|
# If QAsciiReader.skip = True it accepts automatically and returns None
|
||||||
status = r(f).exec()
|
if status == QtWidgets.QDialog.DialogCode.Rejected and isinstance(r, QAsciiReader) and self.reader['txt'].skip:
|
||||||
if status == QtWidgets.QDialog.Rejected and isinstance(r, QAsciiReader):
|
|
||||||
break
|
break
|
||||||
|
status = r(f).exec()
|
||||||
|
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user