mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +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:
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "diagrameventaddimage.h"
|
||||
|
||||
#include "../qetapp.h"
|
||||
#include "../diagram.h"
|
||||
#include "../undocommand/addgraphicsobjectcommand.h"
|
||||
#include "../qetgraphicsitem/diagramimageitem.h"
|
||||
@@ -155,7 +156,7 @@ void DiagramEventAddImage::openDialog()
|
||||
if (m_diagram -> isReadOnly()) return;
|
||||
|
||||
//Open dialog to select image
|
||||
QString pathPictures = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation);
|
||||
QString pathPictures = QETApp::pictureDir();
|
||||
QString fileName = QFileDialog::getOpenFileName(m_diagram->views().isEmpty()? nullptr : m_diagram->views().first(), QObject::tr("Selectionner une image..."), pathPictures, QObject::tr("Image Files (*.png *.jpg *.jpeg *.bmp *.svg)"));
|
||||
|
||||
if (fileName.isEmpty()) return;
|
||||
|
||||
Reference in New Issue
Block a user