Skip to content

Commit 3965cd0

Browse files
author
Fleury
committed
[fix][UI] QFormLayout row item descriptions were doubled if the loading element was used multiple times
1 parent ecd5eee commit 3965cd0

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

src/ui/input/bag/ConfigurePlayBagWidget.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,21 @@ ConfigurePlayBagWidget::populateTreeWidget()
9898
m_treeWidget->resizeColumns();
9999
m_treeWidget->blockSignals(false);
100100

101-
m_lowerOptionsLayout->addRow("Rate:", m_rateSpinBox);
102-
m_lowerOptionsLayout->addRow("Loop File:", m_loopCheckBox);
103-
104101
m_unselectLabel->setVisible(true);
105102
m_treeWidget->setVisible(true);
106103
m_okButton->setVisible(true);
107104

108105
enableOkButton();
106+
107+
// Only add the spinbox and checkbox once
108+
static auto rowsAdded = false;
109+
if (rowsAdded) {
110+
return;
111+
}
112+
113+
m_lowerOptionsLayout->addRow("Rate:", m_rateSpinBox);
114+
m_lowerOptionsLayout->addRow("Loop File:", m_loopCheckBox);
115+
rowsAdded = true;
109116
}
110117

111118

0 commit comments

Comments
 (0)