Fix issues with new stylesheet cache
This commit is contained in:
parent
9307cf86fa
commit
ba8083c539
@ -374,6 +374,7 @@ class Config(QObject):
|
|||||||
|
|
||||||
def __init__(self, yaml_config, parent=None):
|
def __init__(self, yaml_config, parent=None):
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
|
self.changed.connect(_render_stylesheet.cache_clear)
|
||||||
self._values = {}
|
self._values = {}
|
||||||
self._mutables = []
|
self._mutables = []
|
||||||
self._yaml = yaml_config
|
self._yaml = yaml_config
|
||||||
@ -619,7 +620,6 @@ def init(parent=None):
|
|||||||
val = ConfigContainer(instance)
|
val = ConfigContainer(instance)
|
||||||
key_instance = KeyConfig(instance)
|
key_instance = KeyConfig(instance)
|
||||||
|
|
||||||
instance.changed.connect(_render_stylesheet.cache_clear)
|
|
||||||
configtypes.Font.monospace_fonts = val.fonts.monospace
|
configtypes.Font.monospace_fonts = val.fonts.monospace
|
||||||
|
|
||||||
config_commands = ConfigCommands(instance, key_instance)
|
config_commands = ConfigCommands(instance, key_instance)
|
||||||
|
@ -169,7 +169,9 @@ def debug_all_objects():
|
|||||||
def debug_cache_stats():
|
def debug_cache_stats():
|
||||||
"""Print LRU cache stats."""
|
"""Print LRU cache stats."""
|
||||||
prefix_info = configdata.is_valid_prefix.cache_info()
|
prefix_info = configdata.is_valid_prefix.cache_info()
|
||||||
|
# pylint: disable=protected-access
|
||||||
render_stylesheet_info = config._render_stylesheet.cache_info()
|
render_stylesheet_info = config._render_stylesheet.cache_info()
|
||||||
|
# pylint: enable=protected-access
|
||||||
log.misc.debug('is_valid_prefix: {}'.format(prefix_info))
|
log.misc.debug('is_valid_prefix: {}'.format(prefix_info))
|
||||||
log.misc.debug('_render_stylesheet: {}'.format(render_stylesheet_info))
|
log.misc.debug('_render_stylesheet: {}'.format(render_stylesheet_info))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user