void InspectorHBox::apply() { HBox* box = static_cast<HBox*>(inspector->element()); Score* score = box->score(); qreal _spatium = score->spatium(); qreal leftGap = hb.leftGap->value() * _spatium; qreal rightGap = hb.rightGap->value() * _spatium; Spatium width(hb.width->value()); if (leftGap != box->topGap() || rightGap != box->bottomGap() || width != box->boxWidth()) { score->startCmd(); score->undo(new ChangeBoxProperties(box, box->leftMargin(), box->topMargin(), box->rightMargin(), box->bottomMargin(), box->boxHeight(), width, leftGap, rightGap )); score->setLayoutAll(true); score->endCmd(); mscore->endCmd(); } }