mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
[layouts] Final fixes for data defined widgets showing outdated
data defined definitions when clicking between layout items of the same type Fixes #18694
This commit is contained in:
parent
5e3fdb96b8
commit
bbdbfa17a9
@ -55,6 +55,7 @@ Returns the current layout context coverage layer (if set).
|
||||
Returns the atlas for the layout, if available
|
||||
%End
|
||||
|
||||
|
||||
};
|
||||
|
||||
class QgsLayoutItemBaseWidget: QgsPanelWidget
|
||||
|
@ -119,6 +119,11 @@ QgsLayoutAtlas *QgsLayoutConfigObject::layoutAtlas() const
|
||||
return printLayout->atlas();
|
||||
}
|
||||
|
||||
void QgsLayoutConfigObject::setObject( QgsLayoutObject *object )
|
||||
{
|
||||
mLayoutObject = object;
|
||||
}
|
||||
|
||||
QgsVectorLayer *QgsLayoutConfigObject::coverageLayer() const
|
||||
{
|
||||
if ( !mLayoutObject )
|
||||
@ -321,6 +326,8 @@ void QgsLayoutItemPropertiesWidget::setItem( QgsLayoutItem *item )
|
||||
connect( mItem, &QgsLayoutObject::changed, this, &QgsLayoutItemPropertiesWidget::setValuesForGuiNonPositionElements );
|
||||
}
|
||||
|
||||
mConfigObject->setObject( mItem );
|
||||
|
||||
setValuesForGuiElements();
|
||||
}
|
||||
|
||||
|
@ -86,6 +86,15 @@ class GUI_EXPORT QgsLayoutConfigObject: public QObject
|
||||
//! Returns the atlas for the layout, if available
|
||||
QgsLayoutAtlas *layoutAtlas() const;
|
||||
|
||||
/**
|
||||
* Links a new layout \a object to this QgsLayoutConfigObject. The object must be the same type as the existing
|
||||
* object.
|
||||
*
|
||||
* \note Not available in Python bindings
|
||||
* \since QGIS 3.4
|
||||
*/
|
||||
void setObject( QgsLayoutObject *object ) SIP_SKIP;
|
||||
|
||||
private slots:
|
||||
//! Must be called when a data defined button changes
|
||||
void updateDataDefinedProperty();
|
||||
|
Loading…
x
Reference in New Issue
Block a user