From b31ae5502d1b0137271e7c33d9cda1ca334e3e2a Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Wed, 29 Jun 2022 21:07:16 -0400 Subject: [PATCH] Call updateExpanders() in RackWidget::squeezeModulePos() and unsqueezeModulePos(), fixing expanders not connecting when cloning modules. --- src/app/RackWidget.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/RackWidget.cpp b/src/app/RackWidget.cpp index 11e986f8..d2ab3889 100644 --- a/src/app/RackWidget.cpp +++ b/src/app/RackWidget.cpp @@ -764,8 +764,7 @@ void RackWidget::setModulePosSqueeze(ModuleWidget* mw, math::Vec pos) { unsqueezeModulePos(mw); squeezeModulePos(mw, pos); - - updateExpanders(); + // updateExpanders() called above twice } void RackWidget::squeezeModulePos(ModuleWidget* mw, math::Vec pos) { @@ -820,6 +819,8 @@ void RackWidget::squeezeModulePos(ModuleWidget* mw, math::Vec pos) { // Commit new pos mw->setGridPosition(mwBox.pos); + + updateExpanders(); } void RackWidget::unsqueezeModulePos(ModuleWidget* mw) { @@ -863,6 +864,8 @@ void RackWidget::unsqueezeModulePos(ModuleWidget* mw) { xLeft = mw2->getGridBox().getRight(); } } + + updateExpanders(); } void RackWidget::updateModuleOldPositions() {