mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-20 22:18:30 +00:00
fix: SimplyPrint device tab ignores the uploaded file import URL (#16555)
The tab switch queued a reload of the host's home page, which ran after the import URL and replaced it. Switch tabs synchronously first, then queue the import URL so it is the last page loaded.
This commit is contained in:
1 parent
37dcc65752
commit
c081aa97f7
1 file changed
+7
-3
@@ -350,9 +350,13 @@ bool SimplyPrint::do_temp_upload(const boost::filesystem::path& file_path,
|
||||
if (should_open_in_external_browser()) {
|
||||
wxLaunchDefaultBrowser(url);
|
||||
} else {
|
||||
const auto mainframe = GUI::wxGetApp().mainframe;
|
||||
mainframe->request_select_tab(TAB_ID_MONITOR);
|
||||
mainframe->load_printer_url(url);
|
||||
// The tab switch queues a reload of the printer's home page, so switch synchronously
|
||||
// first and queue the import page after it.
|
||||
GUI::wxGetApp().CallAfter([url = wxString::FromUTF8(url)] {
|
||||
const auto mainframe = GUI::wxGetApp().mainframe;
|
||||
mainframe->select_tab(TAB_ID_MONITOR);
|
||||
mainframe->load_printer_url(url);
|
||||
});
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user