| 221 | } |
| 222 | |
| 223 | void PlotTemplateDialog::showPreview() { |
| 224 | for (auto* plot : m_worksheet->children<CartesianPlot>()) |
| 225 | m_worksheet->removeChild(plot); |
| 226 | |
| 227 | auto* plot = generatePlot(); |
| 228 | if (plot) { |
| 229 | m_worksheet->addChild(plot); |
| 230 | updateErrorMessage(QLatin1String("")); // hide error text edit |
| 231 | } |
| 232 | } |
| 233 | |
| 234 | void PlotTemplateDialog::updateErrorMessage(const QString& message) { |
| 235 | if (message.isEmpty()) { |
nothing calls this directly
no test coverage detected