diff options
Diffstat (limited to 'lib/elements')
| -rw-r--r-- | lib/elements/element.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/elements/element.py b/lib/elements/element.py index c9d7c377..ae0ff5c6 100644 --- a/lib/elements/element.py +++ b/lib/elements/element.py @@ -22,7 +22,7 @@ from ..svg import (PIXELS_PER_MM, apply_transforms, convert_length, get_node_transform) from ..svg.tags import INKSCAPE_LABEL, INKSTITCH_ATTRIBS from ..utils import Point, cache -from ..utils.cache import CacheKeyGenerator, get_stitch_plan_cache +from ..utils.cache import get_stitch_plan_cache, is_cache_disabled, CacheKeyGenerator class Param(object): @@ -496,6 +496,9 @@ class EmbroideryElement(object): @debug.time def _load_cached_stitch_groups(self, previous_stitch): + if is_cache_disabled(): + return None + if not self.uses_previous_stitch(): # we don't care about the previous stitch previous_stitch = None @@ -519,6 +522,9 @@ class EmbroideryElement(object): @debug.time def _save_cached_stitch_groups(self, stitch_groups, previous_stitch): + if is_cache_disabled(): + return + stitch_plan_cache = get_stitch_plan_cache() cache_key = self.get_cache_key(previous_stitch) if cache_key not in stitch_plan_cache: |
