Add Show() before Raise() calls for wxWidgets 3.3 compatibility

In wxWidgets 3.3, wxWindow::Raise() no longer implies Show(). Add
explicit Show() before Raise() in two event handlers that activate the
main frame from another instance (load model, start download), and swap
the Show/Raise order in bring_instance_forward() so Show() precedes
Raise().
This commit is contained in:
SoftFever
2026-03-24 20:57:58 +08:00
parent 026b105dcb
commit ba867cc534

View File

@@ -5299,12 +5299,14 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
for (size_t i = 0; i < evt.data.size(); ++i) {
input_files.push_back(from_u8(evt.data[i].string()));
}
wxGetApp().mainframe->Show();
wxGetApp().mainframe->Raise();
this->q->load_files(input_files);
});
this->q->Bind(EVT_START_DOWNLOAD_OTHER_INSTANCE, [](StartDownloadOtherInstanceEvent& evt) {
BOOST_LOG_TRIVIAL(trace) << "Received url from other instance event.";
wxGetApp().mainframe->Show();
wxGetApp().mainframe->Raise();
for (size_t i = 0; i < evt.data.size(); ++i) {
wxGetApp().start_download(evt.data[i]);
@@ -11557,8 +11559,8 @@ void Plater::priv::bring_instance_forward() const
{
main_frame->Restore();
wxGetApp().GetTopWindow()->SetFocus(); // focus on my window
wxGetApp().GetTopWindow()->Raise(); // bring window to front
wxGetApp().GetTopWindow()->Show(true); // show the window
wxGetApp().GetTopWindow()->Raise(); // bring window to front
}
}