mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 05:21:49 +00:00
fix ui elements overriding
This commit is contained in:
parent
69cf4c1c04
commit
c214d70f1d
4 changed files with 8 additions and 5 deletions
|
|
@ -45,7 +45,7 @@ std::shared_ptr<gui::UINode> UiDocument::get(const std::string& id) const {
|
|||
if (found == map.end()) {
|
||||
return nullptr;
|
||||
}
|
||||
return found->second;
|
||||
return found->second.lock();
|
||||
}
|
||||
|
||||
const uidocscript& UiDocument::getScript() const {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ struct uidocscript {
|
|||
bool onclose : 1;
|
||||
};
|
||||
|
||||
using UINodesMap = std::unordered_map<std::string, std::shared_ptr<gui::UINode>>;
|
||||
using UINodesMap = std::unordered_map<std::string, std::weak_ptr<gui::UINode>>;
|
||||
|
||||
class UiDocument {
|
||||
std::string id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue