add "index" keyword to ascii reader to use row number; part of #135

This commit is contained in:
Dominik Demuth
2023-11-10 18:56:13 +01:00
parent 8772fa9e7a
commit aff9cd31a7
4 changed files with 67 additions and 14 deletions

View File

@ -179,9 +179,13 @@ class QAsciiReader(QtWidgets.QDialog, Ui_ascii_reader):
def apply(self):
# default row for x is the first row, it will be superseded if an integer number is given.
try:
x = int(self.x_lineedit.text())-1
except ValueError:
x = self.x_lineedit.text()
if x:
try:
x = int(x)-1
except ValueError:
pass
else:
x = None
try: