diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 1b2f11c..3cd9ccb 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -145,6 +145,8 @@ MainWindow::MainWindow() setWindowIcon(QIcon(":/misc/kima2.ico")); updateStatLabel(); + ui_.lastPriceLabel1->setText(formatCentAsEuroString(0).c_str()); + ui_.lastPriceLabel2->setText(formatCentAsEuroString(0).c_str()); } void MainWindow::onActionEditSellerTriggered() @@ -363,6 +365,14 @@ void MainWindow::onCancelSaleButtonClicked([[maybe_unused]] bool checked) } ui_.salesView->collapseAll(); + + QString lastPriceValue(formatCentAsEuroString(0).c_str()); + if (ui_.salesView->model()->rowCount() > 0) { + lastPriceValue = ui_.salesView->model()->data(ui_.salesView->model()->index(0, 1)).toString(); + } + ui_.lastPriceLabel1->setText(lastPriceValue); + ui_.lastPriceLabel2->setText(lastPriceValue); + updateStatLabel(); } @@ -585,3 +595,4 @@ void MainWindow::updateStatLabel() ui_.statLabel->setText(statistics.c_str()); } +