Skip to content

Commit

Permalink
Use full height on attribute form with drag and drop layout
Browse files Browse the repository at this point in the history
And fix some file permission issues
  • Loading branch information
m-kuhn committed Jun 5, 2015
1 parent 316210d commit e66dd99
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Empty file modified python/gui/qgscolorswatchgrid.sip 100755 → 100644
Empty file.
Empty file modified python/gui/qgscolorwidgets.sip 100755 → 100644
Empty file.
11 changes: 7 additions & 4 deletions src/gui/qgsattributeform.cpp
Expand Up @@ -387,15 +387,16 @@ void QgsAttributeForm::init()
// Tab layout
if ( !formWidget && mLayer->editorLayout() == QgsVectorLayer::TabLayout )
{
QTabWidget* tabWidget = new QTabWidget( this );
QTabWidget* tabWidget = new QTabWidget();
layout()->addWidget( tabWidget );

Q_FOREACH ( QgsAttributeEditorElement *widgDef, mLayer->attributeEditorElements() )
{
QWidget* tabPage = new QWidget( tabWidget );

tabWidget->addTab( tabPage, widgDef->name() );
QGridLayout *tabPageLayout = new QGridLayout( tabPage );
QGridLayout* tabPageLayout = new QGridLayout();
tabPage->setLayout( tabPageLayout );

if ( widgDef->type() == QgsAttributeEditorElement::AeTypeContainer )
{
Expand Down Expand Up @@ -645,7 +646,7 @@ QWidget* QgsAttributeForm::createWidgetFromDef( const QgsAttributeEditorElement
newWidget = scrollArea;
}

QGridLayout* gbLayout = new QGridLayout( myContainer );
QGridLayout* gbLayout = new QGridLayout();
myContainer->setLayout( gbLayout );

int index = 0;
Expand Down Expand Up @@ -680,7 +681,9 @@ QWidget* QgsAttributeForm::createWidgetFromDef( const QgsAttributeEditorElement

++index;
}
gbLayout->addItem( new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding ), index, 0 );
QWidget* spacer = new QWidget();
spacer->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );
gbLayout->addWidget( spacer, index, 0 );

labelText = QString::null;
labelOnTop = true;
Expand Down

0 comments on commit e66dd99

Please sign in to comment.