fix show new opened tab

This commit is contained in:
2026-03-28 21:24:44 +03:00
parent a5f856b224
commit e45b65af23
2 changed files with 6 additions and 3 deletions

View File

@@ -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();
}
}

View File

@@ -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)