From 27a6775e3c3a04a620af8351c2e7abaf98dff333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A5l=20Hagen?= Date: Fri, 16 Oct 2015 10:06:45 +0200 Subject: [PATCH] (#541) Change multiple "_" in default export file name to one --- ApplicationCode/Commands/RicExportToLasFileFeature.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ApplicationCode/Commands/RicExportToLasFileFeature.cpp b/ApplicationCode/Commands/RicExportToLasFileFeature.cpp index 55bb225653..17c45bf7c0 100644 --- a/ApplicationCode/Commands/RicExportToLasFileFeature.cpp +++ b/ApplicationCode/Commands/RicExportToLasFileFeature.cpp @@ -29,6 +29,7 @@ #include #include +#include CAF_CMD_SOURCE_INIT(RicExportToLasFileFeature, "RicExportToLasFileFeature"); @@ -54,6 +55,7 @@ void RicExportToLasFileFeature::onActionTriggered(bool isChecked) defaultFileName.replace(".", "_"); defaultFileName.replace(",", "_"); defaultFileName.replace(" ", "_"); + defaultFileName.replace(QRegExp("_+"), "_"); defaultFileName.append(".las"); QString fileName = QFileDialog::getSaveFileName(RiuMainWindow::instance(), tr("Export Curve Data To LAS File"), QDir(defaultDir).absoluteFilePath(defaultFileName), tr("LAS Files (*.las);;All files(*.*)"));