Commit 611c50ef authored by Nikita Sirgienko's avatar Nikita Sirgienko

[Julia] Fix bug with missing plots in the saved worksheet

parent bb62b071
......@@ -78,12 +78,9 @@ void JuliaExpression::finalize(const QString& output, const QString& error, bool
setResult(new Cantor::TextResult(output));
setStatus(Cantor::Expression::Error);
} else {
if (!m_plot_filename.isEmpty()
&& QFileInfo(m_plot_filename).exists()) {
if (!m_plot_filename.isEmpty() && QFileInfo(m_plot_filename).exists()) {
// If we have plot in result, show it
setResult(
new Cantor::ImageResult(QUrl::fromLocalFile(m_plot_filename)));
QDir().remove(m_plot_filename);
setResult(new Cantor::ImageResult(QUrl::fromLocalFile(m_plot_filename)));
} else {
if (!output.isEmpty())
setResult(new Cantor::TextResult(output));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment