# HG changeset patch # User Chris Cannam # Date 1578666702 0 # Node ID 0075f5b8f76c946780774cb1ca0c039927af7f1c # Parent cf233ce425f649c9893e03fe9ab3ad1bc5135bda Only ask about writing a selection where the format supports it diff -r cf233ce425f6 -r 0075f5b8f76c main/MainWindow.cpp --- a/main/MainWindow.cpp Fri Jan 10 14:31:32 2020 +0000 +++ b/main/MainWindow.cpp Fri Jan 10 14:31:42 2020 +0000 @@ -3020,10 +3020,18 @@ if (path == "") return; + QString suffix = QFileInfo(path).suffix().toLower(); + if (suffix == "") suffix = "svl"; // this is what exportLayerTo defaults to + + bool canWriteSelection = ! (suffix == "xml" || + suffix == "svl" || + suffix == "n3" || + suffix == "ttl"); + MultiSelection ms = m_viewManager->getSelection(); MultiSelection *selectionToWrite = nullptr; - if (!ms.getSelections().empty()) { + if (canWriteSelection && !ms.getSelections().empty()) { QStringList items; items << tr("Export the content of the selected area")