[Uml-devel] KDE/kdesdk/umbrello/umbrello
Ralf Habacker
ralf.habacker at gmail.com
Tue Mar 13 17:43:29 UTC 2012
SVN commit 1285406 by habacker:
Dot not provide dot file type for image export when no dot
config file is available for the related diagram type.
This avoids a 'Could not create file..' error message after image export.
M +6 -1 umlviewimageexporter.cpp
--- trunk/KDE/kdesdk/umbrello/umbrello/umlviewimageexporter.cpp #1285405:1285406
@@ -10,9 +10,10 @@
// own header
#include "umlviewimageexporter.h"
-#include "umlfiledialog.h"
// application specific includes
+#include "dotgenerator.h"
+#include "umlfiledialog.h"
#include "umlviewimageexportermodel.h"
#include "uml.h"
#include "umldoc.h"
@@ -164,6 +165,10 @@
// get all supported mime types
QStringList mimeTypes = UMLViewImageExporterModel::supportedMimeTypes();
+ QHash<QString,QString> configFiles;
+ if (!DotGenerator::availableConfigFiles(m_scene, configFiles) || configFiles.size() == 0)
+ mimeTypes.removeOne("image/x-dot");
+
fileDialog->setCaption(i18n("Save As"));
fileDialog->setOperationMode(KFileDialog::Saving);
fileDialog->setMimeFilter(mimeTypes, m_imageMimeType);
More information about the umbrello-devel
mailing list