mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
fix ui elements overriding
This commit is contained in:
parent
69cf4c1c04
commit
c214d70f1d
4 changed files with 8 additions and 5 deletions
|
|
@ -385,11 +385,14 @@ bool UINode::isSubnodeOf(const UINode* node) {
|
|||
|
||||
void UINode::getIndices(
|
||||
const std::shared_ptr<UINode>& node,
|
||||
std::unordered_map<std::string, std::shared_ptr<UINode>>& map
|
||||
std::unordered_map<std::string, std::weak_ptr<UINode>>& map
|
||||
) {
|
||||
const std::string& id = node->getId();
|
||||
if (!id.empty()) {
|
||||
map[id] = node;
|
||||
const auto& found = map.find(id);
|
||||
if (found == map.end() || found->second.expired()) {
|
||||
map[id] = node;
|
||||
}
|
||||
}
|
||||
auto container = std::dynamic_pointer_cast<gui::Container>(node);
|
||||
if (container) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue