Disable piece gap if option Sticky edges is not active.

This commit is contained in:
Roman Telezhynskyi 2024-04-06 11:54:37 +03:00
parent b25df043bf
commit a4e2e1f1bf

View File

@ -1246,6 +1246,8 @@ void VPMainWindow::InitPropertyTabLayout()
connect(ui->checkBoxSheetStickyEdges, &QCheckBox::toggled, this,
[this](bool checked)
{
ui->doubleSpinBoxSheetPiecesGap->setEnabled(checked);
if (not m_layout.isNull())
{
m_layout->LayoutSettings().SetStickyEdges(checked);
@ -1607,6 +1609,7 @@ void VPMainWindow::SetPropertyTabLayoutData()
SetDoubleSpinBoxValue(ui->doubleSpinBoxSheetPiecesGap, m_layout->LayoutSettings().GetPiecesGapConverted());
ui->doubleSpinBoxSheetPiecesGap->setSuffix(" " + UnitsToStr(LayoutUnit(), true));
ui->doubleSpinBoxSheetPiecesGap->setEnabled(ui->checkBoxSheetStickyEdges->isChecked());
ui->groupBoxLayoutScale->setDisabled(false);