Mercurial > hg > sonic-visualiser
changeset 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 | cc4ff6fde597 |
children | a740e96d7fec |
files | .hgsubstate main/MainWindow.cpp |
diffstat | 2 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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 {