From d5e47ceb0f9068c6e8560f5fa0f97bf71cb1916e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 10 Nov 2014 08:08:46 +0100 Subject: only replace profile directory if not cancelled --- facetracknoir/ui.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'facetracknoir') diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp index f8b6e120..c30343e0 100644 --- a/facetracknoir/ui.cpp +++ b/facetracknoir/ui.cpp @@ -145,6 +145,10 @@ void MainWindow::saveAs() QString fileName = QFileDialog::getSaveFileName(this, tr("Save file"), oldFile, tr("Settings file (*.ini);;All Files (*)")); + + if (fileName.isEmpty()) + return; + (void) QFile::remove(fileName); { -- cgit v1.2.3