mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-08 00:05:09 -04:00
use new settings API in DXF export (#56852)
This commit is contained in:
parent
9a2d8ad8bd
commit
71583dbc0c
@ -142,7 +142,6 @@ QgsVectorLayerAndAttributeModel::QgsVectorLayerAndAttributeModel( QgsLayerTree *
|
||||
: QgsLayerTreeModel( rootNode, parent )
|
||||
{
|
||||
//init mCreateDDBlockInfo, mDDBlocksMaxNumberOfClasses
|
||||
bool ddBlockDefaultEnabled = QgsSettings().value( QStringLiteral( "/qgis/dxfEnableDDBlocks" ), false ).toBool();
|
||||
QSet<QString> layerIds;
|
||||
retrieveAllLayers( rootNode, layerIds );
|
||||
for ( const auto &id : std::as_const( layerIds ) )
|
||||
@ -150,7 +149,7 @@ QgsVectorLayerAndAttributeModel::QgsVectorLayerAndAttributeModel( QgsLayerTree *
|
||||
const QgsVectorLayer *vLayer = qobject_cast< const QgsVectorLayer *>( QgsProject::instance()->mapLayer( id ) );
|
||||
if ( vLayer )
|
||||
{
|
||||
mCreateDDBlockInfo[vLayer] = ddBlockDefaultEnabled;
|
||||
mCreateDDBlockInfo[vLayer] = QgsDxfExportDialog::settingsDxfEnableDDBlocks->value();
|
||||
mDDBlocksMaxNumberOfClasses[vLayer] = -1;
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include "qgslayertreemodel.h"
|
||||
#include "qgslayertreeview.h"
|
||||
#include "qgsdxfexport.h"
|
||||
#include "qgssettingstree.h"
|
||||
#include "qgssettingsentryimpl.h"
|
||||
|
||||
#include <QList>
|
||||
#include <QPair>
|
||||
@ -97,6 +99,9 @@ class QgsDxfExportDialog : public QDialog, private Ui::QgsDxfExportDialogBase
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
static inline QgsSettingsTreeNode *sTreeAppDdxf = QgsSettingsTree::sTreeApp->createChildNode( QStringLiteral( "dxf" ) );
|
||||
static const inline QgsSettingsEntryBool *settingsDxfEnableDDBlocks = new QgsSettingsEntryBool( QStringLiteral( "enable-datadefined-blocks" ), sTreeAppDdxf, false );
|
||||
|
||||
QgsDxfExportDialog( QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags() );
|
||||
~QgsDxfExportDialog() override;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user