Compare commits
No commits in common. "d784a268727d8f481b51db9f39948e1c1cb3a449" and "715c8252d87b06700e202f729efce597231a61b8" have entirely different histories.
d784a26872
...
715c8252d8
3 changed files with 1 additions and 11 deletions
Binary file not shown.
Binary file not shown.
|
@ -13,7 +13,7 @@ SellerDialog::SellerDialog(QWidget* parent, Qt::WindowFlags f) : QDialog(parent,
|
||||||
model_ = std::make_unique<SellerModel>(market_, ui_.tableView);
|
model_ = std::make_unique<SellerModel>(market_, ui_.tableView);
|
||||||
ui_.tableView->setModel(model_.get());
|
ui_.tableView->setModel(model_.get());
|
||||||
ui_.tableView->setColumnHidden(0, true); // hide the uuid
|
ui_.tableView->setColumnHidden(0, true); // hide the uuid
|
||||||
ui_.tableView->setRowHidden(0, true); // hide the special "Sonderkonto" user
|
ui_.tableView->setRowHidden(0, true); // hide the special "Sonderkonto" user
|
||||||
connect(ui_.newButton, &QPushButton::clicked, this, &SellerDialog::on_newButton_clicked);
|
connect(ui_.newButton, &QPushButton::clicked, this, &SellerDialog::on_newButton_clicked);
|
||||||
connect(ui_.deleteButton, &QPushButton::clicked, this, &SellerDialog::on_deleteButton_clicked);
|
connect(ui_.deleteButton, &QPushButton::clicked, this, &SellerDialog::on_deleteButton_clicked);
|
||||||
connect(model_.get(), &SellerModel::duplicateSellerNo, this,
|
connect(model_.get(), &SellerModel::duplicateSellerNo, this,
|
||||||
|
@ -24,16 +24,6 @@ SellerDialog::SellerDialog(QWidget* parent, Qt::WindowFlags f) : QDialog(parent,
|
||||||
|
|
||||||
void SellerDialog::on_newButton_clicked()
|
void SellerDialog::on_newButton_clicked()
|
||||||
{
|
{
|
||||||
// Don't allow new seller if market has already started
|
|
||||||
if (market_->getSales().size() > 0) {
|
|
||||||
QMessageBox(QMessageBox::Icon::Warning, "Hinweis",
|
|
||||||
"Da die Verkaufsphase schon begonnen hat (Artikel wurden bereits verkauft) "
|
|
||||||
"können Sie keine Verkäufer mehr hinzufügen.",
|
|
||||||
QMessageBox::StandardButton::Ok, this)
|
|
||||||
.exec();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ui_.tableView->reset();
|
ui_.tableView->reset();
|
||||||
ui_.tableView->model()->insertRows(ui_.tableView->model()->rowCount(), 1);
|
ui_.tableView->model()->insertRows(ui_.tableView->model()->rowCount(), 1);
|
||||||
ui_.tableView->scrollToBottom();
|
ui_.tableView->scrollToBottom();
|
||||||
|
|
Loading…
Reference in a new issue