Log Frame: Make clear act clear pending messages (#14004)

This commit is contained in:
Elad Ashkenazi 2023-06-12 19:46:09 +03:00 committed by GitHub
parent b436d2a7f4
commit 59430ee83e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -100,6 +100,12 @@ struct gui_listener : logs::listener
pending = queue.pop_all();
return pending.get();
}
void clear()
{
pending = lf_queue_slice<packet_t>();
queue.pop_all();
}
};
// GUI Listener instance
@ -232,6 +238,7 @@ void log_frame::CreateAndConnectActions()
{
m_old_log_text.clear();
m_log->clear();
s_gui_listener.clear();
});
m_clear_tty_act = new QAction(tr("Clear"), this);