diff main/MainWindow.cpp @ 522:d6ddc2c2a6ed

Fix failure to either export a file or explain why, when exporting an unsupported layer type to rdf
author Chris Cannam
date Tue, 11 Dec 2012 13:07:59 +0000
parents 581c72fb14a4
children a740e96d7fec
line wrap: on
line diff
--- a/main/MainWindow.cpp	Sun Nov 25 18:10:07 2012 +0000
+++ b/main/MainWindow.cpp	Tue Dec 11 13:07:59 2012 +0000
@@ -2594,10 +2594,14 @@
 
     } else if (suffix == "ttl" || suffix == "n3") {
 
-        RDFExporter exporter(path, model);
-        exporter.write();
-        if (!exporter.isOK()) {
-            error = exporter.getError();
+        if (!RDFExporter::canExportModel(model)) {
+            error = tr("Sorry, cannot export this layer type to RDF (supported types are: region, note, text, time instants, time values)");
+        } else {
+            RDFExporter exporter(path, model);
+            exporter.write();
+            if (!exporter.isOK()) {
+                error = exporter.getError();
+            }
         }
 
     } else {