FIX: cannot continue slice all when sync extruder list now
jira: STUDIO-9613 Change-Id: I1ce6953f4a802051a9ee9464518b55e9fc1f8e2b
This commit is contained in:
parent
ccd993b63d
commit
74f189e807
|
@ -1599,7 +1599,7 @@ wxBoxSizer* MainFrame::create_side_tools()
|
||||||
m_slice_btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent& event)
|
m_slice_btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
m_plater->reset_check_status();
|
m_plater->reset_check_status();
|
||||||
if (!m_plater->check_ams_status())
|
if (!m_plater->check_ams_status(m_slice_select == eSliceAll))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//this->m_plater->select_view_3D("Preview");
|
//this->m_plater->select_view_3D("Preview");
|
||||||
|
|
|
@ -3428,7 +3428,7 @@ struct Plater::priv
|
||||||
GLCanvas3D* get_current_canvas3D(bool exclude_preview = false);
|
GLCanvas3D* get_current_canvas3D(bool exclude_preview = false);
|
||||||
void unbind_canvas_event_handlers();
|
void unbind_canvas_event_handlers();
|
||||||
void reset_canvas_volumes();
|
void reset_canvas_volumes();
|
||||||
bool check_ams_status_impl(); // Check whether the printer and ams status are consistent, for grouping algorithm
|
bool check_ams_status_impl(bool is_slice_all); // Check whether the printer and ams status are consistent, for grouping algorithm
|
||||||
bool get_machine_sync_status(); // check whether the printer is linked and the printer type is same as selected profile
|
bool get_machine_sync_status(); // check whether the printer is linked and the printer type is same as selected profile
|
||||||
|
|
||||||
// BBS
|
// BBS
|
||||||
|
@ -4375,7 +4375,7 @@ void Plater::priv::select_view_3D(const std::string& name, bool no_slice)
|
||||||
set_current_panel(view3D, no_slice);
|
set_current_panel(view3D, no_slice);
|
||||||
}
|
}
|
||||||
else if (name == "Preview") {
|
else if (name == "Preview") {
|
||||||
if (!q->check_ams_status())
|
if (!q->check_ams_status(false))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
BOOST_LOG_TRIVIAL(info) << "select preview";
|
BOOST_LOG_TRIVIAL(info) << "select preview";
|
||||||
|
@ -8211,7 +8211,7 @@ void Plater::priv::on_action_open_project(SimpleEvent&)
|
||||||
void Plater::priv::on_action_slice_plate(SimpleEvent&)
|
void Plater::priv::on_action_slice_plate(SimpleEvent&)
|
||||||
{
|
{
|
||||||
if (q != nullptr) {
|
if (q != nullptr) {
|
||||||
if (!q->check_ams_status())
|
if (!q->check_ams_status(false))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << ":received slice plate event\n" ;
|
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << ":received slice plate event\n" ;
|
||||||
|
@ -9161,7 +9161,7 @@ void Plater::priv::reset_canvas_volumes()
|
||||||
preview->get_canvas3d()->reset_volumes();
|
preview->get_canvas3d()->reset_volumes();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Plater::priv::check_ams_status_impl()
|
bool Plater::priv::check_ams_status_impl(bool is_slice_all)
|
||||||
{
|
{
|
||||||
Slic3r::DeviceManager *dev = Slic3r::GUI::wxGetApp().getDeviceManager();
|
Slic3r::DeviceManager *dev = Slic3r::GUI::wxGetApp().getDeviceManager();
|
||||||
if (!dev)
|
if (!dev)
|
||||||
|
@ -9239,7 +9239,10 @@ bool Plater::priv::check_ams_status_impl()
|
||||||
dlg.Fit();
|
dlg.Fit();
|
||||||
if (dlg.ShowModal() == wxID_YES) {
|
if (dlg.ShowModal() == wxID_YES) {
|
||||||
if (GUI::wxGetApp().sidebar().sync_extruder_list()) {
|
if (GUI::wxGetApp().sidebar().sync_extruder_list()) {
|
||||||
wxPostEvent(q, SimpleEvent(EVT_GLTOOLBAR_SLICE_PLATE));
|
if (is_slice_all)
|
||||||
|
wxPostEvent(q, SimpleEvent(EVT_GLTOOLBAR_SLICE_ALL));
|
||||||
|
else
|
||||||
|
wxPostEvent(q, SimpleEvent(EVT_GLTOOLBAR_SLICE_PLATE));
|
||||||
wxGetApp().mainframe->m_tabpanel->SetSelection(MainFrame::TabPosition::tpPreview);
|
wxGetApp().mainframe->m_tabpanel->SetSelection(MainFrame::TabPosition::tpPreview);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -15957,10 +15960,10 @@ void Plater::update_objects_position_when_select_preset(const std::function<void
|
||||||
p->update_objects_position_when_select_preset(select_prest);
|
p->update_objects_position_when_select_preset(select_prest);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Plater::check_ams_status()
|
bool Plater::check_ams_status(bool is_slice_all)
|
||||||
{
|
{
|
||||||
if (m_check_status == 0) {
|
if (m_check_status == 0) {
|
||||||
if (!p->check_ams_status_impl()) {
|
if (!p->check_ams_status_impl(is_slice_all)) {
|
||||||
m_check_status = 0;
|
m_check_status = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -605,7 +605,7 @@ public:
|
||||||
void post_process_string_object_exception(StringObjectException &err);
|
void post_process_string_object_exception(StringObjectException &err);
|
||||||
void update_objects_position_when_select_preset(const std::function<void()> &select_prest);
|
void update_objects_position_when_select_preset(const std::function<void()> &select_prest);
|
||||||
|
|
||||||
bool check_ams_status();
|
bool check_ams_status(bool is_slice_all);
|
||||||
// only check sync status and printer model id
|
// only check sync status and printer model id
|
||||||
bool get_machine_sync_status();
|
bool get_machine_sync_status();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue