NewItemDialog content is now reset after accept() & using a default value of 1 for share amount.
This commit is contained in:
@ -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("");
|
||||
}
|
||||
|
||||
@ -61,6 +61,8 @@ class NewItemDialog : public AbstractDialog {
|
||||
|
||||
QLabel* m_mailLabel;
|
||||
QLineEdit* m_mailEdit;
|
||||
|
||||
void resetContent();
|
||||
};
|
||||
|
||||
#endif // NEWITEMDIALOG_H
|
||||
|
||||
Reference in New Issue
Block a user