Skip to content
Browse files

Fix for container "show as group box" setting is lost when closing

layer properties dialog

We can't use the checkbox visibility to determine whether it applies,
as the checkbox will ALWAYS be invisible when applying the settings
as a result of clicking "OK" (since the form is already closed and
all child widgets are not visible at that stage)

Fixes #37205
  • Loading branch information
nyalldawson committed Jun 15, 2020
1 parent 7ec4968 commit 803f507d45f99534dbc03ab5300e6137da36cd59
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/gui/attributeformconfig/qgsattributeformcontaineredit.cpp
@@ -32,6 +32,7 @@ QgsAttributeFormContainerEdit::QgsAttributeFormContainerEdit( QTreeWidgetItem *i
// only top level items can be tabs
// i.e. it's always a group box if it's a nested container
mShowAsGroupBoxCheckBox->setEnabled( false );

mTitleLineEdit->setText( );
@@ -59,7 +60,7 @@ void QgsAttributeFormContainerEdit::updateItemData()
QgsAttributesFormProperties::DnDTreeItemData itemData = mTreeItem->data( 0, QgsAttributesFormProperties::DnDTreeRole ).value<QgsAttributesFormProperties::DnDTreeItemData>();

itemData.setColumnCount( mColumnCountSpinBox->value() );
itemData.setShowAsGroupBox( mShowAsGroupBoxCheckBox->isVisible() ? mShowAsGroupBoxCheckBox->isChecked() : false );
itemData.setShowAsGroupBox( mShowAsGroupBoxCheckBox->isEnabled() ? mShowAsGroupBoxCheckBox->isChecked() : false );
itemData.setName( mTitleLineEdit->text() );
itemData.setShowLabel( mShowLabelCheckBox->isChecked() );
itemData.setBackgroundColor( mBackgroundColorButton->color() );

0 comments on commit 803f507

Please sign in to comment.
You can’t perform that action at this time.