diff --git a/src/app/ModuleWidget.cpp b/src/app/ModuleWidget.cpp index 88738333..533732d5 100644 --- a/src/app/ModuleWidget.cpp +++ b/src/app/ModuleWidget.cpp @@ -845,6 +845,7 @@ void ModuleWidget::cloneAction(bool cloneCables) { else APP->scene->rack->setModulePosNearest(clonedModuleWidget, clonedPos); h->push(APP->scene->rack->getModuleDragAction()); + APP->scene->rack->updateExpanders(); // history::ModuleAdd history::ModuleAdd* hma = new history::ModuleAdd; @@ -920,6 +921,8 @@ void ModuleWidget::removeAction() { // This removes the module and transfers ownership to caller APP->scene->rack->removeModule(this); delete this; + + APP->scene->rack->updateExpanders(); } diff --git a/src/app/RackWidget.cpp b/src/app/RackWidget.cpp index a5ffd08e..d92c160e 100644 --- a/src/app/RackWidget.cpp +++ b/src/app/RackWidget.cpp @@ -764,7 +764,8 @@ void RackWidget::setModulePosSqueeze(ModuleWidget* mw, math::Vec pos) { unsqueezeModulePos(mw); squeezeModulePos(mw, pos); - // updateExpanders() called above twice + + updateExpanders(); } void RackWidget::squeezeModulePos(ModuleWidget* mw, math::Vec pos) { @@ -819,8 +820,6 @@ void RackWidget::squeezeModulePos(ModuleWidget* mw, math::Vec pos) { // Commit new pos mw->setGridPosition(mwBox.pos); - - updateExpanders(); } void RackWidget::unsqueezeModulePos(ModuleWidget* mw) { @@ -864,8 +863,6 @@ void RackWidget::unsqueezeModulePos(ModuleWidget* mw) { xLeft = mw2->getGridBox().getRight(); } } - - updateExpanders(); } void RackWidget::updateModuleOldPositions() {