BUGFIX: correctly render the currently selected chart when exporting to image files

This commit is contained in:
Axel Kohlmeyer
2023-10-02 18:19:27 -04:00
parent 77d0475fb7
commit 5db01aa989

View File

@ -103,7 +103,10 @@ void ChartWindow::saveAs()
QString fileName = QFileDialog::getSaveFileName(this, "Save Chart as Image", defaultname,
"Image Files (*.jpg *.png *.bmp *.ppm)");
if (!fileName.isEmpty()) {
charts[active_chart]->grab().save(fileName);
int choice = columns->currentData().toInt();
for (auto &c : charts) {
if (choice == c->get_index()) c->grab().save(fileName);
}
}
}