diff --git a/src/monitor/gui/components/creator/cpp/base.cpp b/src/monitor/gui/components/creator/cpp/base.cpp index c4151b6..b24685c 100644 --- a/src/monitor/gui/components/creator/cpp/base.cpp +++ b/src/monitor/gui/components/creator/cpp/base.cpp @@ -32,10 +32,12 @@ namespace monitor::components void creator::clear() { m_status = utils::var::STATUS::COMPLETED; - auto future = std::async(std::launch::async, [this]() { - std::this_thread::sleep_for(std::chrono::seconds(1)); + auto f = [this]() { + std::this_thread::sleep_for(std::chrono::seconds(3)); m_file_path.clear(); m_status = utils::var::STATUS::EMPTY; - }); + }; + std::thread th(f); + th.detach(); } } diff --git a/src/monitor/gui/components/tabs/cpp/base.cpp b/src/monitor/gui/components/tabs/cpp/base.cpp index 41a8344..62a85e4 100755 --- a/src/monitor/gui/components/tabs/cpp/base.cpp +++ b/src/monitor/gui/components/tabs/cpp/base.cpp @@ -31,6 +31,7 @@ namespace monitor::components VE::event e0 { utils::event_type::CREATE_SNAPSHOT_COMPLETED, nullptr }; EMIT(e0); + m_current_open_index = m_snapshots.size() - 1 ; } void tabs::change_tab(std::size_t i)