Skip to content

Commit fc0b38e

Browse files
committed
1.2024.10.03: page layout: fix update margins
1 parent fa49a77 commit fc0b38e

File tree

3 files changed

+21
-14
lines changed

3 files changed

+21
-14
lines changed

src/stages/page_layout/OptionsWidget.cpp

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ OptionsWidget::preUpdateUI(
201201
}
202202
}
203203

204+
updateFramingsDisplay();
204205
updateMarginsDisplay();
205206

206207
{
@@ -269,7 +270,7 @@ OptionsWidget::extraWMarginChanged(double const val)
269270

270271
m_framings.setFramingWidth(extraWMarginSpinBox->value() / 100.0);
271272

272-
updateMarginsDisplay();
273+
updateFramingsDisplay();
273274
emit framingsChanged(m_framings);
274275
emit marginsSetLocally(m_margins);
275276
updateSizeDisplay();
@@ -287,7 +288,7 @@ OptionsWidget::extraHMarginChanged(double const val)
287288

288289
m_framings.setFramingHeight(extraHMarginSpinBox->value() / 100.0);
289290

290-
updateMarginsDisplay();
291+
updateFramingsDisplay();
291292
emit framingsChanged(m_framings);
292293
emit marginsSetLocally(m_margins);
293294
updateSizeDisplay();
@@ -329,7 +330,6 @@ OptionsWidget::vertMarginsChanged(double const val)
329330
m_margins.setTop(topMarginSpinBox->value() / 100.0);
330331
m_margins.setBottom(bottomMarginSpinBox->value() / 100.0);
331332

332-
333333
emit marginsSetLocally(m_margins);
334334
updateSizeDisplay();
335335
}
@@ -510,14 +510,25 @@ OptionsWidget::updateMarginsDisplay()
510510
{
511511
ScopedIncDec<int> const ignore_scope(m_ignoreMarginChanges);
512512

513-
extraWMarginSpinBox->setValue(m_framings.getFramingWidth() * 100.0);
514-
extraHMarginSpinBox->setValue(m_framings.getFramingHeight() * 100.0);
515513
topMarginSpinBox->setValue(m_margins.top() * 100.0);
516514
bottomMarginSpinBox->setValue(m_margins.bottom() * 100.0);
517515
leftMarginSpinBox->setValue(m_margins.left() * 100.0);
518516
rightMarginSpinBox->setValue(m_margins.right() * 100.0);
519517
}
520518

519+
void
520+
OptionsWidget::updateLinkDisplay(QToolButton* button, bool const linked)
521+
{
522+
button->setIcon(linked ? m_chainIcon : m_brokenChainIcon);
523+
}
524+
525+
void
526+
OptionsWidget::updateFramingsDisplay()
527+
{
528+
extraWMarginSpinBox->setValue(m_framings.getFramingWidth() * 100.0);
529+
extraHMarginSpinBox->setValue(m_framings.getFramingHeight() * 100.0);
530+
}
531+
521532
void
522533
OptionsWidget::updateSizeDisplay()
523534
{
@@ -542,12 +553,6 @@ OptionsWidget::updateSizeDisplay()
542553
labelExtraHout->setText(tr(" = %1").arg(outheight));
543554
}
544555

545-
void
546-
OptionsWidget::updateLinkDisplay(QToolButton* button, bool const linked)
547-
{
548-
button->setIcon(linked ? m_chainIcon : m_brokenChainIcon);
549-
}
550-
551556
void
552557
OptionsWidget::enableDisableAlignmentButtons()
553558
{

src/stages/page_layout/OptionsWidget.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,12 @@ private slots:
145145

146146
void updateMarginsDisplay();
147147

148-
void updateSizeDisplay();
149-
150148
void updateLinkDisplay(QToolButton* button, bool linked);
151149

150+
void updateFramingsDisplay();
151+
152+
void updateSizeDisplay();
153+
152154
void enableDisableAlignmentButtons();
153155

154156
IntrusivePtr<Settings> m_ptrSettings;

src/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
#define SCANTAILOR_VERSION_H_
2121

2222
#define STFAMILY "experimental"
23-
#define VERSION "1.2024.09.29" // Must be "x.x.x.x" or an empty string.
23+
#define VERSION "1.2024.10.03" // Must be "x.x.x.x" or an empty string.
2424

2525
#endif

0 commit comments

Comments
 (0)