File tree Expand file tree Collapse file tree
src/engine/Component/Editor/Snap Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ namespace vg::engine
4747 // --------------------------------------------------------------------------------------
4848 void SnapComponent::snapObjectRecur (IGameObject * _gameObject)
4949 {
50- if (_gameObject->IsPrefab ())
50+ if (isEnabled () && _gameObject->IsPrefab ())
5151 {
5252 bool dirty = false ;
5353
@@ -125,7 +125,7 @@ namespace vg::engine
125125 // --------------------------------------------------------------------------------------
126126 bool SnapComponent::TryGetSnapTranslate (core::float3 & _translate) const
127127 {
128- if (m_snapTranslation)
128+ if (isEnabled () && m_snapTranslation)
129129 {
130130 _translate = m_translation;
131131 return true ;
@@ -136,7 +136,7 @@ namespace vg::engine
136136 // --------------------------------------------------------------------------------------
137137 bool SnapComponent::TryGetSnapRotate (float & _rotate) const
138138 {
139- if (m_snapRotation)
139+ if (isEnabled () && m_snapRotation)
140140 {
141141 _rotate = m_rotation;
142142 return true ;
@@ -148,7 +148,7 @@ namespace vg::engine
148148 // --------------------------------------------------------------------------------------
149149 bool SnapComponent::TryGetSnapScale (float & _scale) const
150150 {
151- if (m_snapScale)
151+ if (isEnabled () && m_snapScale)
152152 {
153153 _scale = m_scale;
154154 return true ;
You can’t perform that action at this time.
0 commit comments