Skip to content
Permalink
Browse files

Do not add allowCommit to Python bindings

  • Loading branch information
m-kuhn committed Oct 5, 2018
1 parent c3066c2 commit 3522518bec9143f008cbe597c7c06cceff7597d4
Showing with 6 additions and 38 deletions.
  1. +0 −36 python/core/auto_generated/qgsvectorlayer.sip.in
  2. +6 −2 src/core/qgsvectorlayer.h
@@ -2239,43 +2239,7 @@ Configuration and logic to apply automatically on any edit happening on this lay
.. versionadded:: 3.4
%End

bool allowCommit() const;
%Docstring
Controls, if the layer is allowed to commit changes. If this is set to false
it will not be possible to commit changes on this layer. This can be used to
define checks on a layer that need to be pass before the layer can be saved.
If you use this API, make sure that:

- the user is visibly informed that his changes were not saved and what he needs
to do in order to be able to save the changes.

- to set the property back to true, once the user has fixed his data.

When calling :py:func:`commitChanges`, this flag is checked just after the

.. seealso:: :py:func:`beforeCommitChanges`

.. versionadded:: 3.4
%End

void setAllowCommit( bool allowCommit );
%Docstring
Controls, if the layer is allowed to commit changes. If this is set to false
it will not be possible to commit changes on this layer. This can be used to
define checks on a layer that need to be pass before the layer can be saved.
If you use this API, make sure that:

- the user is visibly informed that his changes were not saved and what he needs
to do in order to be able to save the changes.

- to set the property back to true, once the user has fixed his data.

When calling :py:func:`commitChanges`, this flag is checked just after the

.. seealso:: :py:func:`beforeCommitChanges`

.. versionadded:: 3.4
%End

public slots:

@@ -2024,9 +2024,11 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
* When calling \see commitChanges(), this flag is checked just after the
* \see beforeCommitChanges() signal is emitted, so it's possible to adjust it from there.
*
* \note Not available in Python bindings
*
* \since QGIS 3.4
*/
bool allowCommit() const;
bool allowCommit() const SIP_SKIP;

/**
* Controls, if the layer is allowed to commit changes. If this is set to false
@@ -2042,9 +2044,11 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
* When calling \see commitChanges(), this flag is checked just after the
* \see beforeCommitChanges() signal is emitted, so it's possible to adjust it from there.
*
* \note Not available in Python bindings
*
* \since QGIS 3.4
*/
void setAllowCommit( bool allowCommit );
void setAllowCommit( bool allowCommit ) SIP_SKIP;

public slots:

0 comments on commit 3522518

Please sign in to comment.
You can’t perform that action at this time.