Address PR comments

This commit is contained in:
Alessandro Pasotti 2024-09-18 09:58:16 +02:00 committed by Nyall Dawson
parent 93435dda89
commit 5c76ebf092
5 changed files with 17 additions and 14 deletions

View File

@ -128,16 +128,16 @@ an expression context for the editor when required.
QgsMapLayer *layer() const;
%Docstring
Returns the (possibly NULL) layer associated with the expression editor.
Returns the (possibly NULL) layer associated with the expression editor context.
.. versionadded:: 3.30
.. versionadded:: 3.40
%End
void setLayer( QgsMapLayer *layer );
%Docstring
Sets the ``layer`` to be used for in the expression editor context.
Sets the ``layer`` to be used associated with the expression editor context.
.. versionadded:: 3.30
.. versionadded:: 3.40
%End
signals:

View File

@ -128,16 +128,16 @@ an expression context for the editor when required.
QgsMapLayer *layer() const;
%Docstring
Returns the (possibly NULL) layer associated with the expression editor.
Returns the (possibly NULL) layer associated with the expression editor context.
.. versionadded:: 3.30
.. versionadded:: 3.40
%End
void setLayer( QgsMapLayer *layer );
%Docstring
Sets the ``layer`` to be used for in the expression editor context.
Sets the ``layer`` to be used associated with the expression editor context.
.. versionadded:: 3.30
.. versionadded:: 3.40
%End
signals:

View File

@ -18,6 +18,7 @@
#include "qgslayoutmanualtablewidget.h"
#include "qgslayoutatlas.h"
#include "qgslayout.h"
#include "qgslayoutreportcontext.h"
#include "qgsprintlayout.h"
#include "qgslayoutframe.h"
#include "qgslayoutitemwidget.h"
@ -186,7 +187,7 @@ void QgsLayoutManualTableWidget::setTableContents()
else
{
mEditorDialog = new QgsTableEditorDialog( this );
if ( QgsLayout * layout =mTable->layout() )
if ( QgsLayout *layout = mTable->layout() )
{
mEditorDialog->setLayer( layout->reportContext().layer() );
}

View File

@ -21,6 +21,7 @@
#include "qgspanelwidgetstack.h"
#include "qgstableeditorformattingwidget.h"
#include "qgssettings.h"
#include "qgsmaplayer.h"
#include <QClipboard>
#include <QMessageBox>
@ -154,7 +155,7 @@ void QgsTableEditorDialog::closeEvent( QCloseEvent * )
QgsMapLayer *QgsTableEditorDialog::layer() const
{
return mLayer;
return mLayer.data();
}
void QgsTableEditorDialog::setLayer( QgsMapLayer *layer )

View File

@ -19,6 +19,7 @@
#include "qgstablecell.h"
#include "ui_qgstableeditorbase.h"
#include <QMainWindow>
#include <QPointer>
class QgsTableEditorWidget;
class QgsMessageBar;
@ -144,14 +145,14 @@ class GUI_EXPORT QgsTableEditorDialog : public QMainWindow, private Ui::QgsTable
void registerExpressionContextGenerator( QgsExpressionContextGenerator *generator );
/**
* Returns the (possibly NULL) layer associated with the expression editor.
* \since QGIS 3.30
* Returns the (possibly NULL) layer associated with the expression editor context.
* \since QGIS 3.40
*/
QgsMapLayer *layer() const;
/**
* Sets the \a layer to be used for in the expression editor context.
* \since QGIS 3.30
* Sets the \a layer to be used associated with the expression editor context.
* \since QGIS 3.40
*/
void setLayer( QgsMapLayer *layer );