Fixed new link line not showing up in the world editor

This commit is contained in:
Aruki 2017-05-21 19:20:27 -06:00
parent f5654dcfa7
commit 8e819fd454
3 changed files with 11 additions and 23 deletions

View File

@ -217,15 +217,12 @@ void CEditorApplication::TickEditors()
{
if (pEditor->isVisible())
{
pEditor->EditorTick((float) DeltaTime);
CBasicViewport *pViewport = pEditor->Viewport();
bool ViewportVisible = (pViewport && pViewport->isVisible() && !pEditor->isMinimized());
if (pViewport && pViewport->isVisible() && !pEditor->isMinimized())
{
pViewport->ProcessInput();
pViewport->Render();
}
if (ViewportVisible) pViewport->ProcessInput();
pEditor->EditorTick((float) DeltaTime);
if (ViewportVisible) pViewport->Render();
}
}
}

View File

@ -355,6 +355,12 @@ CSceneViewport* CWorldEditor::Viewport() const
}
// ************ PUBLIC SLOTS ************
void CWorldEditor::EditorTick(float)
{
// Update new link line
UpdateNewLinkLine();
}
void CWorldEditor::NotifyNodeAboutToBeDeleted(CSceneNode *pNode)
{
INodeEditor::NotifyNodeAboutToBeDeleted(pNode);
@ -1144,21 +1150,6 @@ void CWorldEditor::OnPickModeExit()
UpdateCursor();
}
void CWorldEditor::RefreshViewport()
{
if (!mGizmo.IsTransforming())
mGizmo.ResetSelectedAxes();
// Process input
ui->MainViewport->ProcessInput();
// Update new link line
UpdateNewLinkLine();
// Render
ui->MainViewport->Render();
}
void CWorldEditor::UpdateCameraOrbit()
{
CCamera *pCamera = &ui->MainViewport->Camera();

View File

@ -98,6 +98,7 @@ public:
inline bool CanRepack() const { return !mWorldDir.isEmpty() && !mPakFileList.isEmpty() && !mPakTarget.isEmpty(); }
public slots:
virtual void EditorTick(float);
virtual void NotifyNodeAboutToBeDeleted(CSceneNode *pNode);
void Cut();
@ -150,7 +151,6 @@ private slots:
void OnUndoStackIndexChanged();
void OnPickModeEnter(QCursor Cursor);
void OnPickModeExit();
void RefreshViewport();
void UpdateCameraOrbit();
void OnCameraSpeedChange(double Speed);
void OnTransformSpinBoxModified(CVector3f Value);