diff --git a/core/src/partassembly.cpp b/core/src/partassembly.cpp index 96518e4..cb50510 100644 --- a/core/src/partassembly.cpp +++ b/core/src/partassembly.cpp @@ -94,7 +94,7 @@ void PartAssembly::Scale(Vector3 newSize, bool scaleUp) { parts[0]->size = newSize; parts[0]->UpdateProperty("Size"); sendPropertyUpdatedSignal(parts[0], "Size", Variant(parts[0]->size)); - _bounds = newSize; + _size = _bounds = newSize; return; } @@ -116,7 +116,7 @@ void PartAssembly::Scale(Vector3 newSize, bool scaleUp) { sendPropertyUpdatedSignal(part, "Size", Variant(part->size)); } - _bounds = _bounds * factor; + _size = _bounds = _bounds * factor; } std::vector PartAssembly::GetCurrentTransforms() { diff --git a/editor/mainglwidget.cpp b/editor/mainglwidget.cpp index 725ffc7..d794024 100755 --- a/editor/mainglwidget.cpp +++ b/editor/mainglwidget.cpp @@ -226,6 +226,7 @@ void MainGLWidget::handleLinearTransform(QMouseEvent* evt) { if (editorToolHandles.handlesType == MoveHandles) { selectionAssembly.TransformBy(CFrame() + absDiff); } else if (editorToolHandles.handlesType == ScaleHandles) { + Vector3 oldSize = selectionAssembly.size(); if (evt->modifiers() & Qt::AltModifier) { // If size gets too small, don't if (glm::any(glm::lessThan(glm::vec3(selectionAssembly.size() + abs(draggingHandle->normal) * diff * 2.f), glm::vec3(0.001f)))) @@ -240,6 +241,9 @@ void MainGLWidget::handleLinearTransform(QMouseEvent* evt) { selectionAssembly.TransformBy(CFrame() + absDiff * 0.5f); selectionAssembly.Scale(selectionAssembly.size() + abs(draggingHandle->normal) * diff, diff > 0); } + + if (snappingFactor() > 0 && oldSize != selectionAssembly.size() && mainWindow()->editSoundEffects && QFile::exists("./assets/excluded/switch.wav")) + playSound("./assets/excluded/switch.wav"); } }