fix bug with supports not following a part mirror and mirror not triggering a workspace save

This commit is contained in:
Stewart Allen 2021-03-25 14:19:17 -04:00
commit 995e23bbca
3 changed files with 23 additions and 5 deletions

View file

@ -490,10 +490,7 @@
}
function mirrorSelection() {
API.selection.for_widgets(function(widget) {
widget.mirror();
});
SPACE.update();
API.selection.mirror();
}
function keys(o) {
@ -540,7 +537,7 @@
y = y - current.device.bedDepth/2 + (bounds.max.y - bounds.min.y)/2
}
moveSelection(x, y, z, true);
API.selection.move(x, y, z, true);
}
function deviceExport(exp, name) {

View file

@ -77,6 +77,7 @@
move: moveSelection,
scale: scaleSelection,
rotate: rotateSelection,
mirror: mirrorSelection,
meshes: function() { return selectedMeshes.slice() },
widgets: function(orall) {
let sel = selectedMeshes.slice().map(m => m.widget);
@ -1454,6 +1455,15 @@
SPACE.update();
}
function mirrorSelection() {
API.selection.for_widgets(function(widget) {
widget.mirror();
API.event.emit("widget.mirror", widget);
});
SPACE.update();
auto_save();
}
function moveSelection(x, y, z, abs) {
if (viewMode !== VIEWS.ARRANGE) return;
forSelectedGroups(function (w) {