mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
FIX: [STUDIO-3046] prevent wxGuiLog on app quit
Change-Id: I1a973a5e42eb286935317fdd8b6d08fb90a2f429
This commit is contained in:
@@ -2253,10 +2253,17 @@ bool GUI_App::OnInit()
|
||||
|
||||
class wxBoostLog : public wxLog
|
||||
{
|
||||
void DoLogText(const wxString &msg) {
|
||||
void DoLogText(const wxString &msg) override {
|
||||
|
||||
BOOST_LOG_TRIVIAL(warning) << msg.ToUTF8().data();
|
||||
}
|
||||
~wxBoostLog() override
|
||||
{
|
||||
// This is a hack. Prevent thread logs from going to wxGuiLog on app quit.
|
||||
auto t = wxLog::SetActiveTarget(this);
|
||||
wxLog::FlushActive();
|
||||
wxLog::SetActiveTarget(t);
|
||||
}
|
||||
};
|
||||
|
||||
bool GUI_App::on_init_inner()
|
||||
|
||||
Reference in New Issue
Block a user