cache stylesheet

This commit is contained in:
iLLiCiTiT 2021-05-28 13:19:45 +02:00
parent aac4e6157d
commit e8583ccc4a

View file

@ -5,7 +5,10 @@ from openpype import resources
from avalon.vendor import qtawesome
def load_stylesheet():
_STYLESHEET_CACHE = None
def _load_stylesheet():
from . import qrc_resources
qrc_resources.qInitResources()
@ -39,5 +42,12 @@ def load_stylesheet():
return stylesheet
def load_stylesheet():
global _STYLESHEET_CACHE
if _STYLESHEET_CACHE is None:
_STYLESHEET_CACHE = _load_stylesheet()
return _STYLESHEET_CACHE
def app_icon_path():
return resources.pype_icon_filepath()