Skip to content
Permalink
Browse files

Fix config qgsdualview (#41503)

  • Loading branch information
SebastienPeillet committed Feb 11, 2021
1 parent 14ee31a commit 33119caeb8b3c4157abf64f13a26bf2860c3b95d
Showing with 8 additions and 0 deletions.
  1. +2 −0 src/gui/attributetable/qgsdualview.cpp
  2. +6 −0 tests/src/gui/testqgsdualview.cpp
@@ -148,6 +148,8 @@ void QgsDualView::init( QgsVectorLayer *layer, QgsMapCanvas *mapCanvas, const Qg
mAttributeEditor->layout()->addWidget( mAttributeForm );
}

setAttributeTableConfig( mLayer->attributeTableConfig() );

connect( mAttributeForm, &QgsAttributeForm::widgetValueChanged, this, &QgsDualView::featureFormAttributeChanged );
connect( mAttributeForm, &QgsAttributeForm::modeChanged, this, &QgsDualView::formModeChanged );
connect( mAttributeForm, &QgsAttributeForm::filterExpressionSet, this, &QgsDualView::filterExpressionSet );
@@ -47,6 +47,7 @@ class TestQgsDualView : public QObject
void testColumnHeaders();

void testData();
void testAttributeTableConfig();
void testFilterSelected();

void testSelectAll();
@@ -132,6 +133,11 @@ void TestQgsDualView::testData()
}
}

void TestQgsDualView::testAttributeTableConfig()
{
QCOMPARE( mDualView->attributeTableConfig().columns().count(), mPointsLayer->attributeTableConfig().columns().count() );
}

void TestQgsDualView::testFilterSelected()
{
QgsFeature feature;

0 comments on commit 33119ca

Please sign in to comment.