mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 09:47:58 -06:00
Printhost: Make queue window non-modal, fix upload start progress
This commit is contained in:
parent
4d70546a05
commit
f318536556
2 changed files with 3 additions and 1 deletions
|
@ -376,7 +376,7 @@ void MainFrame::init_menubar()
|
||||||
|
|
||||||
windowMenu->AppendSeparator();
|
windowMenu->AppendSeparator();
|
||||||
append_menu_item(windowMenu, wxID_ANY, L("Print Host Upload Queue"), L("Display the Print Host Upload Queue window"),
|
append_menu_item(windowMenu, wxID_ANY, L("Print Host Upload Queue"), L("Display the Print Host Upload Queue window"),
|
||||||
[this](wxCommandEvent&) { m_printhost_queue_dlg->ShowModal(); }, "arrow_up.png");
|
[this](wxCommandEvent&) { m_printhost_queue_dlg->Show(); }, "arrow_up.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
// View menu
|
// View menu
|
||||||
|
|
|
@ -213,6 +213,8 @@ void PrintHostJobQueue::priv::perform_job(PrintHostJob the_job)
|
||||||
{
|
{
|
||||||
if (bg_exit || the_job.empty()) { return; }
|
if (bg_exit || the_job.empty()) { return; }
|
||||||
|
|
||||||
|
emit_progress(0); // Indicate the upload is starting
|
||||||
|
|
||||||
bool success = the_job.printhost->upload(std::move(the_job.upload_data),
|
bool success = the_job.printhost->upload(std::move(the_job.upload_data),
|
||||||
[this](Http::Progress progress, bool &cancel) { this->progress_fn(std::move(progress), cancel); },
|
[this](Http::Progress progress, bool &cancel) { this->progress_fn(std::move(progress), cancel); },
|
||||||
[this](wxString error) {
|
[this](wxString error) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue