Skip to content
Permalink
Browse files

[pyqgis] comment some core additions

  • Loading branch information
3nids committed May 14, 2018
1 parent 81dabd1 commit 45e5b3fb79ac7ba097bc2f88f43a332fef4d4a55
Showing with 16 additions and 4 deletions.
  1. +16 −4 python/core/__init__.py
@@ -214,6 +214,17 @@ def __exit__(self, ex_type, ex_value, traceback):


class ReadWriteContextEnterCategory():
"""
Push a category to the stack
.. code-block:: python
context = QgsReadWriteContext()
with QgsReadWriteContext.enterCategory(context, category, details):
# do something
.. versionadded:: 3.2
"""

def __init__(self, context, category_name, details=None):
self.context = context
@@ -241,10 +252,11 @@ class ProjectDirtyBlocker():
"""
Context manager used to block project setDirty calls.
Example:
project = QgsProject.instance()
with QgsProject.blockDirtying(project):
# do something
.. code-block:: python
project = QgsProject.instance()
with QgsProject.blockDirtying(project):
# do something
.. versionadded:: 3.2
"""

0 comments on commit 45e5b3f

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