mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-23 21:25:13 +00:00
FIX: cannot continue slice all when sync extruder list now
jira: STUDIO-9613 Change-Id: I1ce6953f4a802051a9ee9464518b55e9fc1f8e2b (cherry picked from commit 74f189e807b50db00f185dad499bace51b3ee8ef)
This commit is contained in:
@@ -1584,7 +1584,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");
|
||||||
|
|||||||
@@ -3268,7 +3268,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
|
||||||
@@ -4291,7 +4291,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";
|
||||||
@@ -8134,7 +8134,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" ;
|
||||||
@@ -8969,7 +8969,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)
|
||||||
@@ -9047,6 +9047,9 @@ 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()) {
|
||||||
|
if (is_slice_all)
|
||||||
|
wxPostEvent(q, SimpleEvent(EVT_GLTOOLBAR_SLICE_ALL));
|
||||||
|
else
|
||||||
wxPostEvent(q, SimpleEvent(EVT_GLTOOLBAR_SLICE_PLATE));
|
wxPostEvent(q, SimpleEvent(EVT_GLTOOLBAR_SLICE_PLATE));
|
||||||
wxGetApp().mainframe->m_tabpanel->SetSelection(MainFrame::TabPosition::tpPreview);
|
wxGetApp().mainframe->m_tabpanel->SetSelection(MainFrame::TabPosition::tpPreview);
|
||||||
}
|
}
|
||||||
@@ -15928,10 +15931,10 @@ void Plater::update_objects_position_when_select_preset(const std::function<void
|
|||||||
//p->update_objects_position_when_select_preset(select_prest); // TODO: Orca hack
|
//p->update_objects_position_when_select_preset(select_prest); // TODO: Orca hack
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -651,7 +651,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();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user