aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <[email protected]>2015-02-07 17:21:58 +0100
committerJean-Baptiste Mardelle <[email protected]>2015-02-07 17:21:58 +0100
commit45046b189ee33c4bb7940ba751470c3ccea75efd (patch)
treed684c64f29e3eba3ce739e34696e47ef44176271
parent9bff42210e51351b9f0661b9bb73557a222b8e10 (diff)
Propose file name on save as
-rw-r--r--src/project/projectmanager.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/project/projectmanager.cpp b/src/project/projectmanager.cpp
index 74b069b..8047458 100644
--- a/src/project/projectmanager.cpp
+++ b/src/project/projectmanager.cpp
@@ -236,7 +236,13 @@ bool ProjectManager::saveFileAs(const QString &outputFileName)
bool ProjectManager::saveFileAs()
{
- QString outputFile = QFileDialog::getSaveFileName(0, QString(), m_project->projectFolder().path(), getMimeType(false));
+ QString outputFile;
+ if (m_project->url().isValid()) {
+ outputFile = QFileDialog::getSaveFileName(0, QString(), m_project->url().path(), getMimeType(false));
+ }
+ else {
+ outputFile = QFileDialog::getSaveFileName(0, QString(), m_project->projectFolder().path(), getMimeType(false));
+ }
if (outputFile.isEmpty()) {
return false;
}