@@ -65,9 +65,9 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat
65
65
66
66
QDialogButtonBox *buttonBox = NULL ;
67
67
68
- // UI-File defined layout
69
- if ( !vl->editorLayout () == QgsVectorLayer::UiFileLayout && !vl->editForm ().isEmpty () )
68
+ if ( vl->editorLayout () == QgsVectorLayer::UiFileLayout && !vl->editForm ().isEmpty () )
70
69
{
70
+ // UI-File defined layout
71
71
QFile file ( vl->editForm () );
72
72
73
73
if ( file.open ( QFile::ReadOnly ) )
@@ -83,9 +83,9 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat
83
83
buttonBox = myWidget->findChild <QDialogButtonBox*>();
84
84
}
85
85
}
86
- // Tab display
87
- if ( vl->editorLayout () == QgsVectorLayer::TabLayout )
86
+ else if ( vl->editorLayout () == QgsVectorLayer::TabLayout )
88
87
{
88
+ // Tab display
89
89
mDialog = new QDialog ( QgisApp::instance () );
90
90
91
91
QGridLayout *gridLayout;
@@ -149,19 +149,24 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat
149
149
//
150
150
QVBoxLayout *mypOuterLayout = new QVBoxLayout ();
151
151
mypOuterLayout->setContentsMargins ( 0 , 0 , 0 , 0 );
152
- // transfers layout ownership so no need to call delete
153
152
153
+ // transfers layout ownership so no need to call delete
154
154
mFrame ->setLayout ( mypOuterLayout );
155
+
155
156
QScrollArea *mypScrollArea = new QScrollArea ();
156
157
mypScrollArea->setFrameShape ( QFrame::NoFrame );
157
158
mypScrollArea->setFrameShadow ( QFrame::Plain );
159
+
158
160
// transfers scroll area ownership so no need to call delete
159
161
mypOuterLayout->addWidget ( mypScrollArea );
162
+
160
163
QFrame *mypInnerFrame = new QFrame ();
161
164
mypInnerFrame->setFrameShape ( QFrame::NoFrame );
162
165
mypInnerFrame->setFrameShadow ( QFrame::Plain );
166
+
163
167
// transfers frame ownership so no need to call delete
164
168
mypScrollArea->setWidget ( mypInnerFrame );
169
+
165
170
mypScrollArea->setWidgetResizable ( true );
166
171
QGridLayout *mypInnerLayout = new QGridLayout ( mypInnerFrame );
167
172
0 commit comments