From 3c283ddac9f8aa513bcdc161556a4a88f23a477c Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Wed, 3 Apr 2024 17:51:43 +0200 Subject: [PATCH] split header line like data line in asciireader --- src/gui_qt/io/asciireader.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui_qt/io/asciireader.py b/src/gui_qt/io/asciireader.py index 489c33d..ea4c980 100644 --- a/src/gui_qt/io/asciireader.py +++ b/src/gui_qt/io/asciireader.py @@ -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):