diff --git a/UI/CGizmo.cpp b/UI/CGizmo.cpp index f603707b..2f380606 100644 --- a/UI/CGizmo.cpp +++ b/UI/CGizmo.cpp @@ -85,6 +85,10 @@ void CGizmo::DrawAsset(ERenderOptions /*options*/, u32 asset, const SViewInfo& / CGraphics::UpdateMVPBlock(); + // Clear tint color + CGraphics::sPixelBlock.TintColor = CColor::skWhite.ToVector4f(); + CGraphics::UpdatePixelBlock(); + // Choose material set EGizmoAxes partAxes = pPart[asset].modelAxes; bool isHighlighted = (partAxes != eNone) && ((mSelectedAxes & partAxes) == pPart[asset].modelAxes); diff --git a/UI/CSceneViewport.cpp b/UI/CSceneViewport.cpp index 5b28046f..3eca2bc9 100644 --- a/UI/CSceneViewport.cpp +++ b/UI/CSceneViewport.cpp @@ -113,7 +113,7 @@ void CSceneViewport::keyPressEvent(QKeyEvent* pEvent) { CBasicViewport::keyPressEvent(pEvent); - if (pEvent->key() == Qt::Key_Z) + if (!pEvent->modifiers() && pEvent->key() == Qt::Key_Z) { mCamera.SetMoveMode(eOrbitCamera); } diff --git a/UI/CWorldEditor.cpp b/UI/CWorldEditor.cpp index b132a0e3..b67aa343 100644 --- a/UI/CWorldEditor.cpp +++ b/UI/CWorldEditor.cpp @@ -198,6 +198,9 @@ void CWorldEditor::UpdateGizmoUI() mGizmo.SetLocalRotation(mSelection.front()->AbsoluteRotation()); } } + + // Update camera orbit + UpdateCameraOrbit(); } void CWorldEditor::UpdateSelectionUI() @@ -272,7 +275,7 @@ void CWorldEditor::UpdateCameraOrbit() if (!mSelection.isEmpty()) pCamera->SetOrbit(mSelectionBounds); - else + else if (mpArea) pCamera->SetOrbit(mpArea->AABox(), 0.8f); }