mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-18 17:35:43 +00:00
Added "select connected" action to CSceneViewport context menu
This commit is contained in:
@@ -135,6 +135,28 @@ void INodeEditor::SelectNode(CSceneNode *pNode)
|
||||
}
|
||||
}
|
||||
|
||||
void INodeEditor::BatchSelectNodes(QList<CSceneNode*> Nodes)
|
||||
{
|
||||
if (!mSelectionLocked)
|
||||
{
|
||||
foreach (CSceneNode *pNode, Nodes)
|
||||
{
|
||||
if (pNode->IsSelected())
|
||||
Nodes.removeOne(pNode);
|
||||
}
|
||||
|
||||
if (Nodes.size() > 0)
|
||||
{
|
||||
mUndoStack.beginMacro("Select");
|
||||
|
||||
foreach (CSceneNode *pNode, Nodes)
|
||||
SelectNode(pNode);
|
||||
|
||||
mUndoStack.endMacro();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void INodeEditor::DeselectNode(CSceneNode *pNode)
|
||||
{
|
||||
if (!mSelectionLocked)
|
||||
@@ -144,6 +166,28 @@ void INodeEditor::DeselectNode(CSceneNode *pNode)
|
||||
}
|
||||
}
|
||||
|
||||
void INodeEditor::BatchDeselectNodes(QList<CSceneNode*> Nodes)
|
||||
{
|
||||
if (!mSelectionLocked)
|
||||
{
|
||||
foreach (CSceneNode *pNode, Nodes)
|
||||
{
|
||||
if (!pNode->IsSelected())
|
||||
Nodes.removeOne(pNode);
|
||||
}
|
||||
|
||||
if (Nodes.size() > 0)
|
||||
{
|
||||
mUndoStack.beginMacro("Deselect");
|
||||
|
||||
foreach (CSceneNode *pNode, Nodes)
|
||||
DeselectNode(pNode);
|
||||
|
||||
mUndoStack.endMacro();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void INodeEditor::ClearSelection()
|
||||
{
|
||||
if (!mSelectionLocked)
|
||||
|
||||
Reference in New Issue
Block a user