diff --git a/ChangeLog.txt b/ChangeLog.txt index 19f0cf441..0cafabf4f 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -3,6 +3,7 @@ - Fix visualization for tool Point from circle and tangent. - Fix loading background image. - [smart-pattern/valentina#187] Puzzle: message "Invalid version: Max supported version 0.1.2" when opening 0.1.1 file in Val 0.7.52. +- Fix export measurement separator to CSV. # Valentina 0.7.52 September 12, 2022 - Fix crash when default locale is ru. diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp index 86cda877e..2eb7dbddd 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -816,8 +816,12 @@ void TMainWindow::ExportToCSVData(const QString &fileName, bool withHeader, int { if (not ui->tableWidget->isColumnHidden(column)) { - QTableWidgetItem *header = ui->tableWidget->horizontalHeaderItem(column); - csv.setHeaderText(colCount, header->text()); + QString text; + if (QTableWidgetItem *header = ui->tableWidget->horizontalHeaderItem(column)) + { + text = header->text(); + } + csv.setHeaderText(colCount, text); ++colCount; } } @@ -832,8 +836,12 @@ void TMainWindow::ExportToCSVData(const QString &fileName, bool withHeader, int { if (not ui->tableWidget->isColumnHidden(column)) { - QTableWidgetItem *item = ui->tableWidget->item(row, column); - csv.setText(row, colCount, item->text()); + QString text; + if(QTableWidgetItem *item = ui->tableWidget->item(row, column)) + { + text = item->text(); + } + csv.setText(row, colCount, text); ++colCount; } }