From 4585c9cafa87cad6b54397af7e9375cc31b72f89 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Tue, 27 Jun 2023 03:38:57 +1000 Subject: Lazy-loading of ImageOperation inside Directives also fixed cases of drawables not staying centered after adding directives that scale --- source/base/StarAssets.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/base/StarAssets.cpp') diff --git a/source/base/StarAssets.cpp b/source/base/StarAssets.cpp index 320f813..f805b16 100644 --- a/source/base/StarAssets.cpp +++ b/source/base/StarAssets.cpp @@ -844,6 +844,10 @@ shared_ptr Assets::loadImage(AssetPath const& path) const { return {}; StringMap references; StringList referencePaths; + + for (auto& directives : path.directives.list()) + directives.loadOperations(); + path.directives.forEach([&](auto const& entry, Directives const& directives) { addImageOperationReferences(entry.operation, referencePaths); }); // TODO: This can definitely be better, was changed quickly to support the new Directives. -- cgit v1.2.3