mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-15 22:21:52 -06:00
FIX:fixed studio crash caused by HTTP request blocking
jira:[STUDIO-3849] Change-Id: I6348af96014e80da6b720da48239fed262f0f3c5
This commit is contained in:
parent
c144d4e7d6
commit
44eaa75110
5 changed files with 14 additions and 9 deletions
|
@ -2621,6 +2621,11 @@ void StatusPanel::update_basic_print_data(bool def)
|
|||
|
||||
void StatusPanel::update_model_info()
|
||||
{
|
||||
auto get_subtask_fn = [this](BBLModelTask* subtask) {
|
||||
obj->set_modeltask(subtask);
|
||||
};
|
||||
|
||||
|
||||
if (wxGetApp().getAgent() && obj) {
|
||||
|
||||
BBLSubTask* curr_task = obj->get_subtask();
|
||||
|
@ -2629,11 +2634,7 @@ void StatusPanel::update_model_info()
|
|||
if (!curr_model_task) {
|
||||
curr_model_task = new BBLModelTask();
|
||||
curr_model_task->task_id = curr_task->task_id;
|
||||
int result = wxGetApp().getAgent()->get_subtask(curr_model_task);
|
||||
|
||||
if (result > -1) {
|
||||
obj->set_modeltask(curr_model_task);
|
||||
}
|
||||
wxGetApp().getAgent()->get_subtask(curr_model_task, get_subtask_fn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue