diff --git a/CMakeLists.txt b/CMakeLists.txt index 3234e25..997412b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.8) -project(kima2 VERSION 0.11.1) +project(kima2 VERSION 0.11.2) set(CMAKE_MODULE_PATH "${CMAKE_HOME_DIRECTORY}/cmake" ${CMAKE_MODULE_PATH}) diff --git a/src/core/database.cpp b/src/core/database.cpp index 21686f4..0a07ddd 100644 --- a/src/core/database.cpp +++ b/src/core/database.cpp @@ -41,9 +41,11 @@ 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_extended_string(boost::posix_time::second_clock::local_time()) += ".db"; + destPath += std::string("_") += boost::posix_time::to_iso_string(boost::posix_time::second_clock::local_time()) += ".db"; fs::copy_file(sourcePath, destPath, fs::copy_options::overwrite_existing); diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 420e4a3..929ee2c 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -62,6 +62,7 @@ MainWindow::MainWindow() dynamic_cast(ui_.basketView->model())->cancelSale(); marketplace_->clear(); setSaleModel(); + updateStatLabel(); }); ui_.sellerNoEdit->installEventFilter(this);