setting forceSuppressFormPopup only when true in the widget (not unset it when false) and use more specific function descriptions

This commit is contained in:
signedav 2020-08-14 07:08:49 +02:00
parent 5273e74980
commit 458d39c7e5
7 changed files with 19 additions and 15 deletions

View File

@ -435,7 +435,7 @@ Determines the force suppress form popup status.
void setForceSuppressFormPopup( bool forceSuppressFormPopup );
%Docstring
Sets force suppress form popup status to ``forceSuppressFormPopup``.
This flag will override the layer and general settings regarding the automatic
This flag is to override the layer and general settings regarding the automatic
opening of the attribute form dialog when digitizing is completed.
.. versionadded:: 3.16

View File

@ -115,14 +115,15 @@ Returns the buttons which are shown
bool forceSuppressFormPopup() const;
%Docstring
Determines the force suppress form popup status.
Determines the force suppress form popup status that is configured for this widget
.. versionadded:: 3.16
%End
void setForceSuppressFormPopup( bool forceSuppressFormPopup );
%Docstring
Sets force suppress form popup status to ``forceSuppressFormPopup``.
Sets force suppress form popup status to ``forceSuppressFormPopup`` for this widget
and for the vectorLayerTools (if true).
This flag will override the layer and general settings regarding the automatic
opening of the attribute form dialog when digitizing is completed.

View File

@ -185,16 +185,15 @@ Returns the buttons which are shown
bool forceSuppressFormPopup() const;
%Docstring
Determines the force suppress form popup status.
Determines the force suppress form popup status that is configured for this widget
.. versionadded:: 3.16
%End
void setForceSuppressFormPopup( bool forceSuppressFormPopup );
%Docstring
Sets force suppress form popup status to ``forceSuppressFormPopup``.
This flag will override the layer and general settings regarding the automatic
opening of the attribute form dialog when digitizing is completed.
Sets force suppress form popup status with ``forceSuppressFormPopup``
configured for this widget
.. versionadded:: 3.16
%End

View File

@ -475,7 +475,7 @@ class CORE_EXPORT QgsAttributeEditorRelation : public QgsAttributeEditorElement
/**
* Sets force suppress form popup status to \a forceSuppressFormPopup.
* This flag will override the layer and general settings regarding the automatic
* This flag is to override the layer and general settings regarding the automatic
* opening of the attribute form dialog when digitizing is completed.
* \since QGIS 3.16
*/

View File

@ -233,7 +233,11 @@ void QgsRelationWidgetWrapper::setForceSuppressFormPopup( bool forceSuppressForm
if ( mWidget )
{
mWidget->setForceSuppressFormPopup( forceSuppressFormPopup );
const_cast<QgsVectorLayerTools *>( mWidget->editorContext().vectorLayerTools() )->setForceSuppressFormPopup( forceSuppressFormPopup );
//it's set to true if one widget is configured like this but the setting is done generally (influencing all widgets).
if ( forceSuppressFormPopup )
{
const_cast<QgsVectorLayerTools *>( mWidget->editorContext().vectorLayerTools() )->setForceSuppressFormPopup( true );
}
}
}

View File

@ -107,13 +107,14 @@ class GUI_EXPORT QgsRelationWidgetWrapper : public QgsWidgetWrapper
QgsAttributeEditorRelation::Buttons visibleButtons() const;
/**
* Determines the force suppress form popup status.
* Determines the force suppress form popup status that is configured for this widget
* \since QGIS 3.16
*/
bool forceSuppressFormPopup() const;
/**
* Sets force suppress form popup status to \a forceSuppressFormPopup.
* Sets force suppress form popup status to \a forceSuppressFormPopup for this widget
* and for the vectorLayerTools (if true).
* This flag will override the layer and general settings regarding the automatic
* opening of the attribute form dialog when digitizing is completed.
* \since QGIS 3.16

View File

@ -222,15 +222,14 @@ class GUI_EXPORT QgsRelationEditorWidget : public QgsCollapsibleGroupBox
QgsAttributeEditorRelation::Buttons visibleButtons() const;
/**
* Determines the force suppress form popup status.
* Determines the force suppress form popup status that is configured for this widget
* \since QGIS 3.16
*/
bool forceSuppressFormPopup() const;
/**
* Sets force suppress form popup status to \a forceSuppressFormPopup.
* This flag will override the layer and general settings regarding the automatic
* opening of the attribute form dialog when digitizing is completed.
* Sets force suppress form popup status with \a forceSuppressFormPopup
* configured for this widget
* \since QGIS 3.16
*/
void setForceSuppressFormPopup( bool forceSuppressFormPopup );