[jasper/world/studio] Fix WorldEditor to pull in resource updates
All checks were successful
Build / build (push) Successful in 3m9s
All checks were successful
Build / build (push) Successful in 3m9s
This commit is contained in:
parent
542e492830
commit
ded73a0b4c
@ -239,11 +239,14 @@ void WorldEditorImGui::rmObjSet() noexcept {
|
|||||||
pushCommand<RmObjectSet>(m_doc, m_palMgr.selectedIdx);
|
pushCommand<RmObjectSet>(m_doc, m_palMgr.selectedIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
ox::Error WorldEditorImGui::handleObjectSetUpdate(ox::StringView path) noexcept {
|
ox::Error WorldEditorImGui::handleObjectSetUpdate(ox::StringView, ox::UUID const&uuid) noexcept {
|
||||||
if (ox::any_of(m_doc.objSets.begin(), m_doc.objSets.end(), [path](ObjectSetEntry const&set) {
|
auto const matches = [uuid](ObjectSetEntry const&set) {
|
||||||
return set.path == path;
|
auto const [setUuid, err] = keel::uuidUrlToUuid(set.path);
|
||||||
})) {
|
return !err && setUuid == uuid;
|
||||||
|
};
|
||||||
|
if (ox::any_of(m_doc.objSets.begin(), m_doc.objSets.end(), matches)) {
|
||||||
oxReturnError(buildObjCache(keelCtx(m_sctx.tctx), m_doc).moveTo(m_objCache));
|
oxReturnError(buildObjCache(keelCtx(m_sctx.tctx), m_doc).moveTo(m_objCache));
|
||||||
|
oxReturnError(loadWorldStatic(m_objCache, m_doc).moveTo(m_worldStatic));
|
||||||
}
|
}
|
||||||
return loadObjectSets();
|
return loadObjectSets();
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ class WorldEditorImGui: public studio::Editor {
|
|||||||
void rmObjSet() noexcept;
|
void rmObjSet() noexcept;
|
||||||
|
|
||||||
// handles the updating of an object set in case it is one used by this world
|
// handles the updating of an object set in case it is one used by this world
|
||||||
ox::Error handleObjectSetUpdate(ox::StringView path) noexcept;
|
ox::Error handleObjectSetUpdate(ox::StringView path, ox::UUID const&) noexcept;
|
||||||
|
|
||||||
ox::Error loadObjectSets() noexcept;
|
ox::Error loadObjectSets() noexcept;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user