diff --git a/doc/configuration.rst b/doc/configuration.rst index 136f391..8452060 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -156,15 +156,15 @@ annotations that extend over image boundaries:: Extending default values ======================== -In the usual case one overrides the default when defining a setting +In the usual case one overrides the default when defining a configuration variable. In order to extend the default configuration and avoid overriding the default values, you can first import the default configuration and then append your custom mappings (remember that the configuration is a python -module, you can basically execute any valid python code):: +module, therefore you can execute any valid python code):: from sloth.conf.default_config import LABELS - MYLABLES = ({ + MYLABELS = ({ ... }) diff --git a/sloth/conf/default_config.py b/sloth/conf/default_config.py index 894684f..bf8db27 100644 --- a/sloth/conf/default_config.py +++ b/sloth/conf/default_config.py @@ -9,7 +9,7 @@ # to specify a module path (as string) pointing to such a python callable. # It will then be automatically imported. -# LABLES +# LABELS # # List/tuple of dictionaries that defines the label classes # that are handled by sloth. For each label, there should @@ -31,6 +31,8 @@ # - 'attributes' : (optional) A dictionary that defines the # keys and possible values of this label # class. +# +# - 'text' : (optional) A label for the item's GUI button. LABELS = ( { 'attributes': { @@ -108,3 +110,4 @@ CONTAINERS = ( PLUGINS = ( ) + diff --git a/sloth/core/labeltool.py b/sloth/core/labeltool.py index 9c231b7..03c26cf 100755 --- a/sloth/core/labeltool.py +++ b/sloth/core/labeltool.py @@ -304,7 +304,7 @@ class LabelTool(QObject): if next_image is not None: self.setCurrentImage(next_image) - + def gotoPrevious(self, step=1): if self._model is not None and self._current_image is not None: prev_image = self._current_image.getPreviousSibling(step)