Skip to content

Commit

Permalink
[FEATURE] Default values on update
Browse files Browse the repository at this point in the history
Add an option to add default values on update of attributes or geometry.
This can be seen as a "derived value" that will be saved to the database
(like area of a polygon) or as a means to track last_modified dates etc.

See #5218
  • Loading branch information
m-kuhn committed Sep 29, 2017
1 parent e0cdb18 commit 08cb2d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/core/qgsdefaultvalue.sip
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class QgsDefaultValue
QgsDefaultValue( const QString &expression = QString(), bool applyOnUpdate = false );
%Docstring
Create a new default value with the given ``expression`` and ``applyOnUpdate`` flag.
.. seealso:: QgsVectorLayer.setDefaultValueDefinition
%End
bool operator==( const QgsDefaultValue &other ) const;

Expand Down
1 change: 1 addition & 0 deletions src/core/qgsdefaultvalue.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class CORE_EXPORT QgsDefaultValue

/**
* Create a new default value with the given \a expression and \a applyOnUpdate flag.
* \see QgsVectorLayer::setDefaultValueDefinition
*/
QgsDefaultValue( const QString &expression = QString(), bool applyOnUpdate = false );
bool operator==( const QgsDefaultValue &other ) const;
Expand Down

0 comments on commit 08cb2d7

Please sign in to comment.