Skip to content

Commit

Permalink
#5785: Fix a face selected using Ctrl-Shift-LMB preventing any other …
Browse files Browse the repository at this point in the history
…scene element from showing up in the texture tool.
  • Loading branch information
codereader committed Oct 23, 2021
1 parent fae8ba0 commit 7e6b051
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions radiantcore/selection/textool/TextureToolSceneGraph.cpp
Expand Up @@ -83,26 +83,24 @@ void TextureToolSceneGraph::ensureSceneIsAnalysed()
_nodes.emplace_back(std::make_shared<FaceNode>(face));
});
}
else

GlobalSelectionSystem().foreachSelected([&](const scene::INodePtr& node)
{
GlobalSelectionSystem().foreachSelected([&](const scene::INodePtr& node)
if (Node_isBrush(node))
{
if (Node_isBrush(node))
{
auto brush = Node_getIBrush(node);
assert(brush);
auto brush = Node_getIBrush(node);
assert(brush);

for (auto i = 0; i < brush->getNumFaces(); ++i)
{
_nodes.emplace_back(std::make_shared<FaceNode>(brush->getFace(i)));
}
}
else if (Node_isPatch(node))
for (auto i = 0; i < brush->getNumFaces(); ++i)
{
_nodes.emplace_back(std::make_shared<PatchNode>(*Node_getIPatch(node)));
_nodes.emplace_back(std::make_shared<FaceNode>(brush->getFace(i)));
}
});
}
}
else if (Node_isPatch(node))
{
_nodes.emplace_back(std::make_shared<PatchNode>(*Node_getIPatch(node)));
}
});
}

void TextureToolSceneGraph::onSceneSelectionChanged(const ISelectable& selectable)
Expand Down

0 comments on commit 7e6b051

Please sign in to comment.