Update the rest of the UI on property changes and update properties on node transform

This commit is contained in:
parax0
2016-01-30 18:54:00 -07:00
parent 2e6024b413
commit c7d448225c
29 changed files with 270 additions and 90 deletions

View File

@@ -53,7 +53,6 @@ INodeEditor::INodeEditor(QWidget *pParent)
connect(mGizmoActions[2], SIGNAL(triggered()), this, SLOT(OnRotateTriggered()));
connect(mGizmoActions[3], SIGNAL(triggered()), this, SLOT(OnScaleTriggered()));
connect(mpTransformCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(OnTransformSpaceChanged(int)));
connect(this, SIGNAL(SelectionModified()), this, SLOT(OnSelectionModified()));
}
INodeEditor::~INodeEditor()
@@ -232,6 +231,20 @@ void INodeEditor::ExitPickMode()
}
}
void INodeEditor::NotifySelectionModified()
{
UpdateSelectionUI();
emit SelectionModified();
}
void INodeEditor::NotifySelectionTransformed()
{
foreach (CSceneNode *pNode, mSelection)
pNode->OnTransformed();
emit SelectionTransformed();
}
// ************ PUBLIC SLOTS ************
void INodeEditor::OnGizmoMoved()
{
@@ -302,8 +315,6 @@ void INodeEditor::OnViewportClick(const SRayIntersection& rkRayIntersect, QMouse
ClearSelection();
}
}
UpdateSelectionUI();
}
// In pick mode: process node pick
@@ -445,9 +456,3 @@ void INodeEditor::OnTransformSpaceChanged(int spaceIndex)
mGizmo.SetTransformSpace(space);
}
void INodeEditor::OnSelectionModified()
{
UpdateTransformActionsEnabled();
UpdateSelectionUI();
}