diff --git a/UIs/BeetRoundWidgets/dialogs/newitemdialog.cpp b/UIs/BeetRoundWidgets/dialogs/newitemdialog.cpp index fd6da12..d30b2e8 100644 --- a/UIs/BeetRoundWidgets/dialogs/newitemdialog.cpp +++ b/UIs/BeetRoundWidgets/dialogs/newitemdialog.cpp @@ -46,6 +46,7 @@ void NewItemDialog::createContent() { m_amountLabel = new QLabel(GET_HEADER_FOR_COLUMN(4)); m_amountSpinBox = new QDoubleSpinBox(); m_amountLabel->setBuddy(m_amountSpinBox); + m_amountSpinBox->setValue(1.0); m_biddingTypeLabel = new QLabel(GET_HEADER_FOR_COLUMN(5)); m_biddingTypeBox = new QComboBox(); @@ -128,6 +129,21 @@ void NewItemDialog::accept() { const QByteArray jsonDoc = JsonParser::itemValuesListToJson({itemValues}, ITEMS_KEY_STRING); emit addItems(jsonDoc); - // resetContent(); + resetContent(); AbstractDialog::accept(); } + +void NewItemDialog::resetContent() { + m_numberBox->setValue(0); + m_lastNameEdit->setText(""); + m_firstNameEdit->setText(""); + m_shareTypeBox->setCurrentIndex(0); + m_amountSpinBox->setValue(1); + m_biddingTypeBox->setCurrentIndex(0); + m_bidding1SpinBox->setValue(0); + m_bidding2SpinBox->setValue(0); + m_bidding3SpinBox->setValue(0); + m_depotWish1Edit->setText(""); + m_depotWish2Edit->setText(""); + m_mailEdit->setText(""); +} diff --git a/UIs/BeetRoundWidgets/dialogs/newitemdialog.h b/UIs/BeetRoundWidgets/dialogs/newitemdialog.h index ee22fbf..90d29a7 100644 --- a/UIs/BeetRoundWidgets/dialogs/newitemdialog.h +++ b/UIs/BeetRoundWidgets/dialogs/newitemdialog.h @@ -61,6 +61,8 @@ class NewItemDialog : public AbstractDialog { QLabel* m_mailLabel; QLineEdit* m_mailEdit; + + void resetContent(); }; #endif // NEWITEMDIALOG_H