mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-30 15:50:52 +01:00
Set default-location for projects to documents-dir.
All export files that are derived from the project (BOM, nomenclature, etc.) are saved in the same directory by default. In this context, the standard directories have been grouped together in qetapp.cpp / qetapp.h so that only one place needs to be searched for in case of any adjustments.
This commit is contained in:
@@ -62,8 +62,10 @@ int BOMExportDialog::exec()
|
||||
auto r = QDialog::exec();
|
||||
if (r == QDialog::Accepted)
|
||||
{
|
||||
//save in csv file
|
||||
QString file_name = tr("nomenclature_") + QString(m_project ->title() + ".csv");
|
||||
//save in csv file in same directory as project by default
|
||||
QString dir = m_project->currentDir();
|
||||
if (dir.isEmpty()) dir = QETApp::documentDir();
|
||||
QString file_name = dir + "/" + tr("nomenclature_") + QString(m_project ->title() + ".csv");
|
||||
QString file_path = QFileDialog::getSaveFileName(this, tr("Enregister sous... "), file_name, tr("Fichiers csv (*.csv)"));
|
||||
QFile file(file_path);
|
||||
if (!file_path.isEmpty())
|
||||
|
||||
Reference in New Issue
Block a user