Skip to content
Permalink
Browse files

re-allow circular dependencies (#37641)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
qgis-bot and github-actions committed Jul 7, 2020
1 parent 64a52ea commit 2c9874c5c53cdeb5e65106a0adaa778440775a47
@@ -42,7 +42,6 @@ Adds a properties page factory to the vector layer properties dialog.



public:
};


@@ -388,7 +388,7 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(
dependencySources << layer;
}

mLayersDependenciesTreeModel = new DependenciesLayerTreeModel( mLayer, this );
mLayersDependenciesTreeModel = new QgsLayerTreeFilterProxyModel( this );
mLayersDependenciesTreeModel->setLayerTreeModel( new QgsLayerTreeModel( QgsProject::instance()->layerTreeRoot(), mLayersDependenciesTreeModel ) );
mLayersDependenciesTreeModel->setCheckedLayers( dependencySources );
connect( QgsProject::instance(), &QObject::destroyed, this, [ = ] {mLayersDependenciesTreeView->setModel( nullptr );} );
@@ -160,19 +160,6 @@ class GUI_EXPORT QgsVectorLayerProperties : public QgsOptionsDialogBase, private

private:

class DependenciesLayerTreeModel : public QgsLayerTreeFilterProxyModel
{
public:
DependenciesLayerTreeModel( QgsVectorLayer *mainLayer, QObject *parent = nullptr )
: QgsLayerTreeFilterProxyModel( parent )
, mMainLayer( mainLayer )
{}

private:
QgsVectorLayer *mMainLayer = nullptr;
bool layerShown( QgsMapLayer *layer ) const override {return layer != mMainLayer;}
};

enum PropertyType
{
Style = 0,
@@ -241,7 +228,7 @@ class GUI_EXPORT QgsVectorLayerProperties : public QgsOptionsDialogBase, private

QgsExpressionContext createExpressionContext() const override;

DependenciesLayerTreeModel *mLayersDependenciesTreeModel;
QgsLayerTreeFilterProxyModel *mLayersDependenciesTreeModel;

void showHelp();

0 comments on commit 2c9874c

Please sign in to comment.
You can’t perform that action at this time.