FIX: do not allow auto arranging or orienting when slicing
do not allow arranging/orienting when slicing Jira: STUDIO-5489 Change-Id: I7773941e5aca6819e2b65a5103ea917702fefcad
This commit is contained in:
parent
e3f1efbb36
commit
91d135a4de
|
@ -1237,11 +1237,15 @@ void MenuFactory::create_plate_menu()
|
||||||
[](wxCommandEvent&) {
|
[](wxCommandEvent&) {
|
||||||
PartPlate* plate = plater()->get_partplate_list().get_selected_plate();
|
PartPlate* plate = plater()->get_partplate_list().get_selected_plate();
|
||||||
assert(plate);
|
assert(plate);
|
||||||
|
|
||||||
|
if (!plate->get_objects().empty() && !plater()->is_background_process_slicing())
|
||||||
|
{
|
||||||
plater()->set_prepare_state(Job::PREPARE_STATE_MENU);
|
plater()->set_prepare_state(Job::PREPARE_STATE_MENU);
|
||||||
plater()->arrange();
|
plater()->arrange();
|
||||||
|
}
|
||||||
}, "", nullptr,
|
}, "", nullptr,
|
||||||
[]() {
|
[]() {
|
||||||
return !plater()->get_partplate_list().get_selected_plate()->get_objects().empty();
|
return !plater()->get_partplate_list().get_selected_plate()->get_objects().empty() && !plater()->is_background_process_slicing();
|
||||||
},
|
},
|
||||||
m_parent);
|
m_parent);
|
||||||
|
|
||||||
|
@ -1250,12 +1254,15 @@ void MenuFactory::create_plate_menu()
|
||||||
[](wxCommandEvent&) {
|
[](wxCommandEvent&) {
|
||||||
PartPlate* plate = plater()->get_partplate_list().get_selected_plate();
|
PartPlate* plate = plater()->get_partplate_list().get_selected_plate();
|
||||||
assert(plate);
|
assert(plate);
|
||||||
|
if (!plate->get_objects().empty() && !plater()->is_background_process_slicing())
|
||||||
|
{
|
||||||
//BBS TODO call auto rotate for current plate
|
//BBS TODO call auto rotate for current plate
|
||||||
plater()->set_prepare_state(Job::PREPARE_STATE_MENU);
|
plater()->set_prepare_state(Job::PREPARE_STATE_MENU);
|
||||||
plater()->orient();
|
plater()->orient();
|
||||||
|
}
|
||||||
}, "", nullptr,
|
}, "", nullptr,
|
||||||
[]() {
|
[]() {
|
||||||
return !plater()->get_partplate_list().get_selected_plate()->get_objects().empty();
|
return !plater()->get_partplate_list().get_selected_plate()->get_objects().empty() && !plater()->is_background_process_slicing();
|
||||||
}, m_parent);
|
}, m_parent);
|
||||||
|
|
||||||
// delete current plate
|
// delete current plate
|
||||||
|
|
|
@ -8065,7 +8065,7 @@ bool Plater::priv::can_split_to_volumes() const
|
||||||
|
|
||||||
bool Plater::priv::can_arrange() const
|
bool Plater::priv::can_arrange() const
|
||||||
{
|
{
|
||||||
return !model.objects.empty() && !m_ui_jobs.is_any_running();
|
return !model.objects.empty() && !m_ui_jobs.is_any_running() && !q->is_background_process_slicing();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Plater::priv::layers_height_allowed() const
|
bool Plater::priv::layers_height_allowed() const
|
||||||
|
@ -8790,7 +8790,6 @@ void Plater::load_project(wxString const& filename2,
|
||||||
wxString const& originfile)
|
wxString const& originfile)
|
||||||
{
|
{
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "filename is: " << filename2 << "and originfile is: " << originfile;
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "filename is: " << filename2 << "and originfile is: " << originfile;
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__;
|
|
||||||
auto filename = filename2;
|
auto filename = filename2;
|
||||||
auto check = [&filename, this] (bool yes_or_no) {
|
auto check = [&filename, this] (bool yes_or_no) {
|
||||||
if (!yes_or_no && !wxGetApp().check_and_save_current_preset_changes(_L("Load project"),
|
if (!yes_or_no && !wxGetApp().check_and_save_current_preset_changes(_L("Load project"),
|
||||||
|
@ -13474,6 +13473,8 @@ int Plater::select_plate_by_hover_id(int hover_id, bool right_click, bool isModi
|
||||||
ret = delete_plate(plate_index);
|
ret = delete_plate(plate_index);
|
||||||
}
|
}
|
||||||
else if ((action == 2)&&(!right_click))
|
else if ((action == 2)&&(!right_click))
|
||||||
|
{
|
||||||
|
if (!p->partplate_list.get_plate(plate_index)->get_objects().empty() && !is_background_process_slicing())
|
||||||
{
|
{
|
||||||
//arrange the plate
|
//arrange the plate
|
||||||
//take_snapshot("select_orient partplate");
|
//take_snapshot("select_orient partplate");
|
||||||
|
@ -13489,7 +13490,10 @@ int Plater::select_plate_by_hover_id(int hover_id, bool right_click, bool isModi
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if ((action == 3)&&(!right_click))
|
else if ((action == 3)&&(!right_click))
|
||||||
|
{
|
||||||
|
if (!p->partplate_list.get_plate(plate_index)->get_objects().empty() && !is_background_process_slicing())
|
||||||
{
|
{
|
||||||
//arrange the plate
|
//arrange the plate
|
||||||
//take_snapshot("select_arrange partplate");
|
//take_snapshot("select_arrange partplate");
|
||||||
|
@ -13507,6 +13511,7 @@ int Plater::select_plate_by_hover_id(int hover_id, bool right_click, bool isModi
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if ((action == 4)&&(!right_click))
|
else if ((action == 4)&&(!right_click))
|
||||||
{
|
{
|
||||||
//lock the plate
|
//lock the plate
|
||||||
|
|
Loading…
Reference in New Issue