mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-16 18:05:57 +08:00
Tech ENABLE_WORLD_COORDINATE - Fixed enable/disabled state of mirror context menu item and sidebar mirror buttons
This commit is contained in:
parent
abf918e728
commit
4a22339621
@ -1040,7 +1040,13 @@ void ObjectManipulation::update_mirror_buttons_visibility()
|
|||||||
#endif // !ENABLE_WORLD_COORDINATE
|
#endif // !ENABLE_WORLD_COORDINATE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if !ENABLE_WORLD_COORDINATE
|
|
||||||
|
#if ENABLE_WORLD_COORDINATE
|
||||||
|
const bool can_mirror = wxGetApp().plater()->can_mirror();
|
||||||
|
for (ScalableButton* button : m_mirror_buttons) {
|
||||||
|
button->Enable(can_mirror);
|
||||||
|
}
|
||||||
|
#else
|
||||||
else {
|
else {
|
||||||
// the mirroring buttons should be hidden in world coordinates,
|
// the mirroring buttons should be hidden in world coordinates,
|
||||||
// unless we make it actually mirror in world coords.
|
// unless we make it actually mirror in world coords.
|
||||||
@ -1062,7 +1068,7 @@ void ObjectManipulation::update_mirror_buttons_visibility()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
#endif // !ENABLE_WORLD_COORDINATE
|
#endif // ENABLE_WORLD_COORDINATE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4837,9 +4837,14 @@ bool Plater::priv::layers_height_allowed() const
|
|||||||
|
|
||||||
bool Plater::priv::can_mirror() const
|
bool Plater::priv::can_mirror() const
|
||||||
{
|
{
|
||||||
|
#if ENABLE_WORLD_COORDINATE
|
||||||
|
return !sidebar->obj_list()->has_selected_cut_object();
|
||||||
|
#else
|
||||||
return !sidebar->obj_list()->has_selected_cut_object() && get_selection().is_from_single_instance();
|
return !sidebar->obj_list()->has_selected_cut_object() && get_selection().is_from_single_instance();
|
||||||
|
#endif // ENABLE_WORLD_COORDINATE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Plater::priv::can_replace_with_stl() const
|
bool Plater::priv::can_replace_with_stl() const
|
||||||
{
|
{
|
||||||
return !sidebar->obj_list()->has_selected_cut_object() && get_selection().get_volume_idxs().size() == 1;
|
return !sidebar->obj_list()->has_selected_cut_object() && get_selection().get_volume_idxs().size() == 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user