fix show new opened tab
This commit is contained in:
@@ -32,10 +32,12 @@ namespace monitor::components
|
|||||||
void creator::clear()
|
void creator::clear()
|
||||||
{
|
{
|
||||||
m_status = utils::var::STATUS::COMPLETED;
|
m_status = utils::var::STATUS::COMPLETED;
|
||||||
auto future = std::async(std::launch::async, [this]() {
|
auto f = [this]() {
|
||||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
std::this_thread::sleep_for(std::chrono::seconds(3));
|
||||||
m_file_path.clear();
|
m_file_path.clear();
|
||||||
m_status = utils::var::STATUS::EMPTY;
|
m_status = utils::var::STATUS::EMPTY;
|
||||||
});
|
};
|
||||||
|
std::thread th(f);
|
||||||
|
th.detach();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ namespace monitor::components
|
|||||||
|
|
||||||
VE::event e0 { utils::event_type::CREATE_SNAPSHOT_COMPLETED, nullptr };
|
VE::event e0 { utils::event_type::CREATE_SNAPSHOT_COMPLETED, nullptr };
|
||||||
EMIT(e0);
|
EMIT(e0);
|
||||||
|
m_current_open_index = m_snapshots.size() - 1 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void tabs::change_tab(std::size_t i)
|
void tabs::change_tab(std::size_t i)
|
||||||
|
|||||||
Reference in New Issue
Block a user