Rework UI jobs to make them more understandable and flexible.
This commit is contained in:
parent
f5e2beeaf4
commit
b53ff75cf4
27 changed files with 956 additions and 592 deletions
|
@ -11,6 +11,7 @@
|
|||
#include "libslic3r/PresetBundle.hpp"
|
||||
|
||||
#include "slic3r/GUI/Jobs/RotoptimizeJob.hpp"
|
||||
#include "slic3r/GUI/Jobs/PlaterJob.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
@ -540,11 +541,12 @@ GLGizmoRotate3D::RotoptimzeWindow::RotoptimzeWindow(ImGuiWrapper * imgui,
|
|||
ImVec2 button_sz = {btn_txt_sz.x + padding.x, btn_txt_sz.y + padding.y};
|
||||
ImGui::SetCursorPosX(padding.x + sz.x - button_sz.x);
|
||||
|
||||
if (wxGetApp().plater()->is_any_job_running())
|
||||
if (!wxGetApp().plater()->get_ui_job_worker().is_idle())
|
||||
imgui->disabled_begin(true);
|
||||
|
||||
if ( imgui->button(btn_txt) ) {
|
||||
wxGetApp().plater()->optimize_rotation();
|
||||
auto p = wxGetApp().plater();
|
||||
replace_job<RotoptimizeJob>(*p);
|
||||
}
|
||||
|
||||
imgui->disabled_end();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue