mirror of
https://github.com/qgis/QGIS.git
synced 2025-11-30 00:04:58 -05:00
FIX #35196, layer was not set on QgsFieldExpressionWidget
This commit is contained in:
parent
c6b7aed81e
commit
834c5ba209
@ -18,7 +18,7 @@
|
|||||||
#include "qgsattributesformproperties.h"
|
#include "qgsattributesformproperties.h"
|
||||||
|
|
||||||
|
|
||||||
QgsAttributeFormContainerEdit::QgsAttributeFormContainerEdit( QTreeWidgetItem *item, QWidget *parent )
|
QgsAttributeFormContainerEdit::QgsAttributeFormContainerEdit( QTreeWidgetItem *item, QgsVectorLayer *layer, QWidget *parent )
|
||||||
: QWidget( parent )
|
: QWidget( parent )
|
||||||
, mTreeItem( item )
|
, mTreeItem( item )
|
||||||
{
|
{
|
||||||
@ -40,6 +40,7 @@ QgsAttributeFormContainerEdit::QgsAttributeFormContainerEdit( QTreeWidgetItem *i
|
|||||||
mShowAsGroupBoxCheckBox->setChecked( itemData.showAsGroupBox() );
|
mShowAsGroupBoxCheckBox->setChecked( itemData.showAsGroupBox() );
|
||||||
|
|
||||||
mControlVisibilityGroupBox->setChecked( itemData.visibilityExpression().enabled() );
|
mControlVisibilityGroupBox->setChecked( itemData.visibilityExpression().enabled() );
|
||||||
|
mVisibilityExpressionWidget->setLayer( layer );
|
||||||
mVisibilityExpressionWidget->setExpression( itemData.visibilityExpression()->expression() );
|
mVisibilityExpressionWidget->setExpression( itemData.visibilityExpression()->expression() );
|
||||||
mColumnCountSpinBox->setValue( itemData.columnCount() );
|
mColumnCountSpinBox->setValue( itemData.columnCount() );
|
||||||
mBackgroundColorButton->setColor( itemData.backgroundColor() );
|
mBackgroundColorButton->setColor( itemData.backgroundColor() );
|
||||||
|
|||||||
@ -36,7 +36,7 @@ class GUI_EXPORT QgsAttributeFormContainerEdit: public QWidget, private Ui_QgsAt
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit QgsAttributeFormContainerEdit( QTreeWidgetItem *item, QWidget *parent = nullptr );
|
explicit QgsAttributeFormContainerEdit( QTreeWidgetItem *item, QgsVectorLayer *layer, QWidget *parent = nullptr );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register an expression context generator class that will be used to retrieve
|
* Register an expression context generator class that will be used to retrieve
|
||||||
|
|||||||
@ -438,7 +438,7 @@ void QgsAttributesFormProperties::loadAttributeContainerEdit()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
QTreeWidgetItem *currentItem = mFormLayoutTree->selectedItems().at( 0 );
|
QTreeWidgetItem *currentItem = mFormLayoutTree->selectedItems().at( 0 );
|
||||||
mAttributeContainerEdit = new QgsAttributeFormContainerEdit( currentItem, this );
|
mAttributeContainerEdit = new QgsAttributeFormContainerEdit( currentItem, mLayer, this );
|
||||||
mAttributeContainerEdit->registerExpressionContextGenerator( this );
|
mAttributeContainerEdit->registerExpressionContextGenerator( this );
|
||||||
mAttributeContainerEdit->layout()->setContentsMargins( 0, 0, 0, 0 );
|
mAttributeContainerEdit->layout()->setContentsMargins( 0, 0, 0, 0 );
|
||||||
mAttributeTypeFrame->layout()->setContentsMargins( 0, 0, 0, 0 );
|
mAttributeTypeFrame->layout()->setContentsMargins( 0, 0, 0, 0 );
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user