From 1d08c570cccc22daeacdd0b7b51cca7f8ccd1b67 Mon Sep 17 00:00:00 2001 From: Alessandro Pasotti Date: Fri, 28 May 2021 16:28:35 +0200 Subject: [PATCH] Fix DD form label hidden in tabs Fixes #43103 --- src/gui/qgsattributeform.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gui/qgsattributeform.cpp b/src/gui/qgsattributeform.cpp index e3749a5dc9fa..048417e5037f 100644 --- a/src/gui/qgsattributeform.cpp +++ b/src/gui/qgsattributeform.cpp @@ -2132,7 +2132,7 @@ QgsAttributeForm::WidgetInfo QgsAttributeForm::createWidgetFromDef( const QgsAtt } } - if ( widgetInfo.labelText.isNull() ) + if ( widgetInfo.labelText.isNull() || ! widgetInfo.showLabel ) { gbLayout->addWidget( widgetInfo.widget, row, column, 1, 2 ); column += 2; @@ -2198,6 +2198,7 @@ QgsAttributeForm::WidgetInfo QgsAttributeForm::createWidgetFromDef( const QgsAtt newWidgetInfo.labelText = QString(); newWidgetInfo.labelOnTop = true; + newWidgetInfo.showLabel = widgetDef->showLabel(); break; } @@ -2241,8 +2242,6 @@ QgsAttributeForm::WidgetInfo QgsAttributeForm::createWidgetFromDef( const QgsAtt break; } - newWidgetInfo.showLabel = widgetDef->showLabel(); - return newWidgetInfo; }