# HG changeset patch # User Chris Cannam # Date 1355231279 0 # Node ID d6ddc2c2a6ede54e1a98a659703ac97aa42c816b # Parent cc4ff6fde597979a7240b07348699720dbee5696 Fix failure to either export a file or explain why, when exporting an unsupported layer type to rdf diff -r cc4ff6fde597 -r d6ddc2c2a6ed .hgsubstate --- a/.hgsubstate Sun Nov 25 18:10:07 2012 +0000 +++ b/.hgsubstate Tue Dec 11 13:07:59 2012 +0000 @@ -1,3 +1,3 @@ 8a603a0840c8cb6b756fa598a215a74c336682ac svapp -c9fc7728ab0d19a5496ce01a69c0eb99950df71e svcore +fb6313da1df623e95f5224edbcdbd7a856fe1e62 svcore 156a120345aebfa74dcca1d02d6a7dfa26bed483 svgui diff -r cc4ff6fde597 -r d6ddc2c2a6ed main/MainWindow.cpp --- 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 {