Navigation Menu

Skip to content

Commit

Permalink
re-allow circular dependencies (#37641)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
qgis-bot and github-actions[bot] committed Jul 7, 2020
1 parent 64a52ea commit 2c9874c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
Expand Up @@ -42,7 +42,6 @@ Adds a properties page factory to the vector layer properties dialog.



public:
};


Expand Down
2 changes: 1 addition & 1 deletion src/gui/vector/qgsvectorlayerproperties.cpp
Expand Up @@ -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 );} );
Expand Down
15 changes: 1 addition & 14 deletions src/gui/vector/qgsvectorlayerproperties.h
Expand Up @@ -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,
Expand Down Expand Up @@ -241,7 +228,7 @@ class GUI_EXPORT QgsVectorLayerProperties : public QgsOptionsDialogBase, private

QgsExpressionContext createExpressionContext() const override;

DependenciesLayerTreeModel *mLayersDependenciesTreeModel;
QgsLayerTreeFilterProxyModel *mLayersDependenciesTreeModel;

void showHelp();

Expand Down

0 comments on commit 2c9874c

Please sign in to comment.