Fix creating new db

This commit is contained in:
Martin Brodbeck 2018-10-09 08:04:47 +02:00
parent 6b9ac3d284
commit 7571ef6a13
2 changed files with 3 additions and 0 deletions

View File

@ -41,6 +41,8 @@ void Database::newDb()
{
namespace fs = std::filesystem;
sqlite3_close(db_);
fs::path sourcePath = dbname_;
fs::path destPath = sourcePath.parent_path() / sourcePath.stem();
destPath += std::string("_") += boost::posix_time::to_iso_string(boost::posix_time::second_clock::local_time()) += ".db";

View File

@ -62,6 +62,7 @@ MainWindow::MainWindow()
dynamic_cast<BasketModel*>(ui_.basketView->model())->cancelSale();
marketplace_->clear();
setSaleModel();
updateStatLabel();
});
ui_.sellerNoEdit->installEventFilter(this);