summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleix Pol <aleixpol@kde.org>2016-10-04 01:15:20 (GMT)
committerAleix Pol <aleixpol@kde.org>2016-10-04 01:15:20 (GMT)
commit4816fee60d41010316c823f97e056cb4045adfb1 (patch)
tree909ecda99a9d38b3bcf826a30beaf065c73c2167
parent89c6e000d1bcd18ed878eea6f8a5cebbe80e44d4 (diff)
Make it possible to export 3D plots to STL
-rw-r--r--src/kalgebra.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kalgebra.cpp b/src/kalgebra.cpp
index a814e70..f0ca4a9 100644
--- a/src/kalgebra.cpp
+++ b/src/kalgebra.cpp
@@ -573,9 +573,9 @@ void KAlgebra::set_solid()
void KAlgebra::save3DGraph()
{
#ifdef HAVE_OPENGL
- QString path = QFileDialog::getSaveFileName(this, QString(), QString(), i18n("PNG File (*.png);;PDF Document(*.pdf);;X3D Document (*.x3d)"));
+ QString path = QFileDialog::getSaveFileName(this, QString(), QString(), i18n("PNG File (*.png);;PDF Document(*.pdf);;X3D Document (*.x3d);;STL Document (*.stl)"));
if(!path.isEmpty()) {
- if(path.endsWith(QLatin1String(".x3d"))) {
+ if(path.endsWith(QLatin1String(".x3d")) || path.endsWith(QLatin1String(".stl"))) {
m_graph3d->exportSurfaces(path);
} else if(path.endsWith(QLatin1String(".pdf"))) {
QPixmap px = m_graph3d->renderPixmap();