mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-17 00:04:02 -04:00
Auxiliary storage can be used on non spatial layer
This commit is contained in:
parent
94fde118a5
commit
b6752df628
@ -1545,8 +1545,6 @@ void QgsVectorLayerProperties::updateAuxiliaryStoragePage( bool reset )
|
||||
mAuxiliaryLayerActionClear->setEnabled( false );
|
||||
mAuxiliaryLayerActionDelete->setEnabled( false );
|
||||
mAuxiliaryLayerActionExport->setEnabled( false );
|
||||
|
||||
if ( mLayer->isSpatial() )
|
||||
mAuxiliaryLayerActionNew->setEnabled( true );
|
||||
|
||||
mAuxiliaryStorageFieldsTree->clear();
|
||||
@ -1565,7 +1563,7 @@ void QgsVectorLayerProperties::onAuxiliaryLayerNew()
|
||||
{
|
||||
QgsAuxiliaryLayer *alayer = mLayer->auxiliaryLayer();
|
||||
|
||||
if ( alayer || !mLayer->isSpatial() )
|
||||
if ( alayer )
|
||||
return;
|
||||
|
||||
QgsNewAuxiliaryLayerDialog dlg( mLayer, this );
|
||||
|
@ -480,7 +480,7 @@ QgsAuxiliaryLayer *QgsAuxiliaryStorage::createAuxiliaryLayer( const QgsField &fi
|
||||
{
|
||||
QgsAuxiliaryLayer *alayer = nullptr;
|
||||
|
||||
if ( mValid && layer && layer->isSpatial() )
|
||||
if ( mValid && layer )
|
||||
{
|
||||
const QString table( layer->id() );
|
||||
sqlite3 *handler = openDB( currentFileName() );
|
||||
|
@ -2252,7 +2252,7 @@ QList<QgsMapLayer *> QgsProject::addMapLayers(
|
||||
continue;
|
||||
|
||||
QgsVectorLayer *vl = qobject_cast<QgsVectorLayer *>( mlayer );
|
||||
if ( vl && vl->isSpatial() )
|
||||
if ( vl )
|
||||
{
|
||||
vl->loadAuxiliaryLayer( *mAuxiliaryStorage.get() );
|
||||
}
|
||||
|
@ -4273,7 +4273,7 @@ bool QgsVectorLayer::loadAuxiliaryLayer( const QgsAuxiliaryStorage &storage )
|
||||
{
|
||||
bool rc = false;
|
||||
|
||||
if ( isSpatial() && storage.isValid() && !mAuxiliaryLayerKey.isEmpty() )
|
||||
if ( storage.isValid() && !mAuxiliaryLayerKey.isEmpty() )
|
||||
{
|
||||
QgsAuxiliaryLayer *alayer = nullptr;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user