Skip to content

Commit

Permalink
Check for more not expanding policies
Browse files Browse the repository at this point in the history
  • Loading branch information
domi4484 authored and github-actions[bot] committed Nov 16, 2021
1 parent 035a6f5 commit 4924a59
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/gui/qgsattributeform.cpp
Expand Up @@ -1641,7 +1641,10 @@ void QgsAttributeForm::init()

label->setBuddy( widgetInfo.widget );

if ( widgetInfo.widget->sizePolicy().verticalPolicy() != QSizePolicy::Fixed )
// If at least one expanding widget is present do not add a spacer
if ( widgetInfo.widget->sizePolicy().verticalPolicy() != QSizePolicy::Fixed
&& widgetInfo.widget->sizePolicy().verticalPolicy() != QSizePolicy::Maximum
&& widgetInfo.widget->sizePolicy().verticalPolicy() != QSizePolicy::Preferred )
addSpacer = false;

if ( !widgetInfo.showLabel )
Expand Down

0 comments on commit 4924a59

Please sign in to comment.