mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-05 03:50:51 +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:
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
#include "conductornumexport.h"
|
||||
|
||||
#include "qetapp.h"
|
||||
#include "diagram.h"
|
||||
#include "diagramcontent.h"
|
||||
#include "qetgraphicsitem/conductor.h"
|
||||
@@ -45,7 +46,10 @@ ConductorNumExport::ConductorNumExport(QETProject *project, QWidget *parent) :
|
||||
*/
|
||||
bool ConductorNumExport::toCsv()
|
||||
{
|
||||
QString name = QObject::tr("numero_de_fileries_") + 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 name = dir + "/" + QObject::tr("numero_de_fileries_") + m_project->title() + ".csv";
|
||||
// if(!name.endsWith(".csv")) {
|
||||
// name += ".csv";
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user