Skip to content

Commit ba530a0

Browse files
committed
Merge pull request #2715 from SebDieBln/FixWarnDualViewLayout
Fix warning when a QLayout is already present in QgsDualView.
2 parents bbfcbca + da43fb7 commit ba530a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/gui/attributetable/qgsdualview.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ void QgsDualView::init( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas, const Qg
7575
mTableView->setModel( mFilterModel );
7676
mFeatureList->setModel( mFeatureListModel );
7777
mAttributeForm = new QgsAttributeForm( layer, QgsFeature(), mEditorContext );
78-
mAttributeEditorScrollArea->setLayout( new QGridLayout() );
78+
if ( !mAttributeEditorScrollArea->layout() )
79+
mAttributeEditorScrollArea->setLayout( new QGridLayout() );
7980
mAttributeEditorScrollArea->layout()->addWidget( mAttributeForm );
8081
mAttributeEditorScrollArea->setWidget( mAttributeForm );
8182

0 commit comments

Comments
 (0)