Skip to content

Commit

Permalink
setting forceSuppressFormPopup only when true in the widget (not unse…
Browse files Browse the repository at this point in the history
…t it when false) and use more specific function descriptions
  • Loading branch information
signedav committed Aug 14, 2020
1 parent 5273e74 commit 458d39c
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 15 deletions.
Expand Up @@ -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
Expand Down
Expand Up @@ -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.

Expand Down
7 changes: 3 additions & 4 deletions python/gui/auto_generated/qgsrelationeditorwidget.sip.in
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsattributeeditorelement.h
Expand Up @@ -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
*/
Expand Down
6 changes: 5 additions & 1 deletion src/gui/editorwidgets/qgsrelationwidgetwrapper.cpp
Expand Up @@ -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 );
}
}
}

Expand Down
5 changes: 3 additions & 2 deletions src/gui/editorwidgets/qgsrelationwidgetwrapper.h
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions src/gui/qgsrelationeditorwidget.h
Expand Up @@ -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 );
Expand Down

0 comments on commit 458d39c

Please sign in to comment.