Skip to content

Commit b6752df

Browse files
committedOct 9, 2017
Auxiliary storage can be used on non spatial layer
1 parent 94fde11 commit b6752df

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed
 

‎src/app/qgsvectorlayerproperties.cpp‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,9 +1545,7 @@ void QgsVectorLayerProperties::updateAuxiliaryStoragePage( bool reset )
15451545
mAuxiliaryLayerActionClear->setEnabled( false );
15461546
mAuxiliaryLayerActionDelete->setEnabled( false );
15471547
mAuxiliaryLayerActionExport->setEnabled( false );
1548-
1549-
if ( mLayer->isSpatial() )
1550-
mAuxiliaryLayerActionNew->setEnabled( true );
1548+
mAuxiliaryLayerActionNew->setEnabled( true );
15511549

15521550
mAuxiliaryStorageFieldsTree->clear();
15531551
mAuxiliaryStorageKeyLineEdit->setText( QString() );
@@ -1565,7 +1563,7 @@ void QgsVectorLayerProperties::onAuxiliaryLayerNew()
15651563
{
15661564
QgsAuxiliaryLayer *alayer = mLayer->auxiliaryLayer();
15671565

1568-
if ( alayer || !mLayer->isSpatial() )
1566+
if ( alayer )
15691567
return;
15701568

15711569
QgsNewAuxiliaryLayerDialog dlg( mLayer, this );

‎src/core/qgsauxiliarystorage.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ QgsAuxiliaryLayer *QgsAuxiliaryStorage::createAuxiliaryLayer( const QgsField &fi
480480
{
481481
QgsAuxiliaryLayer *alayer = nullptr;
482482

483-
if ( mValid && layer && layer->isSpatial() )
483+
if ( mValid && layer )
484484
{
485485
const QString table( layer->id() );
486486
sqlite3 *handler = openDB( currentFileName() );

‎src/core/qgsproject.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2252,7 +2252,7 @@ QList<QgsMapLayer *> QgsProject::addMapLayers(
22522252
continue;
22532253

22542254
QgsVectorLayer *vl = qobject_cast<QgsVectorLayer *>( mlayer );
2255-
if ( vl && vl->isSpatial() )
2255+
if ( vl )
22562256
{
22572257
vl->loadAuxiliaryLayer( *mAuxiliaryStorage.get() );
22582258
}

‎src/core/qgsvectorlayer.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4273,7 +4273,7 @@ bool QgsVectorLayer::loadAuxiliaryLayer( const QgsAuxiliaryStorage &storage )
42734273
{
42744274
bool rc = false;
42754275

4276-
if ( isSpatial() && storage.isValid() && !mAuxiliaryLayerKey.isEmpty() )
4276+
if ( storage.isValid() && !mAuxiliaryLayerKey.isEmpty() )
42774277
{
42784278
QgsAuxiliaryLayer *alayer = nullptr;
42794279

0 commit comments

Comments
 (0)
Please sign in to comment.