mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-09 07:56:22 -06:00
Make extra sure cache is emptied when objects get altered.
See the (new) cachePerInstance decorator in UM/Decorators, and the accompanying CachedMemberFunction handler-class. part of CURA-11761
This commit is contained in:
parent
f8aa923ce0
commit
d0252554c4
3 changed files with 10 additions and 2 deletions
|
@ -5,7 +5,7 @@ from typing import Any, cast, List, Optional, Dict
|
|||
from PyQt6.QtCore import pyqtProperty, pyqtSignal, QObject
|
||||
|
||||
from UM.Application import Application
|
||||
from UM.Decorators import override
|
||||
from UM.Decorators import CachedMemberFunctions, override
|
||||
from UM.FlameProfiler import pyqtSlot
|
||||
from UM.Logger import Logger
|
||||
from UM.Settings.ContainerStack import ContainerStack, InvalidContainerStackError
|
||||
|
@ -237,6 +237,7 @@ class CuraContainerStack(ContainerStack):
|
|||
:param new_value: The new value to set the property to.
|
||||
"""
|
||||
|
||||
CachedMemberFunctions.clearInstanceCache(self)
|
||||
container_index = _ContainerIndexes.UserChanges
|
||||
self._containers[container_index].setProperty(key, property_name, property_value, container, set_from_cache)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue