Replace abf918e728 with a better fix

This commit is contained in:
enricoturri1966 2023-01-10 08:25:05 +01:00
parent e4ee0d927d
commit bb8a001963
2 changed files with 5 additions and 11 deletions

View File

@ -300,7 +300,8 @@ bool GLGizmoEmboss::on_mouse_for_rotation(const wxMouseEvent &mouse_event)
angle -= PI / 2; // Grabber is upward
// temporary rotation
TransformationType transformation_type = TransformationType::Local_Relative_Joint;
const TransformationType transformation_type = m_parent.get_selection().is_single_text() ?
TransformationType::Local_Relative_Joint : TransformationType::World_Relative_Joint;
m_parent.get_selection().rotate(Vec3d(0., 0., angle), transformation_type);
angle += *m_rotate_start_angle;

View File

@ -2176,16 +2176,9 @@ void Selection::update_type()
unsigned int instances_count = (unsigned int)model_object->instances.size();
if (volumes_count * instances_count == 1) {
const ModelVolume* model_volume = model_object->volumes[first->volume_idx()];
if (model_volume->text_configuration.has_value()) { // text volume
m_type = SingleVolume;
// ensures the correct mode is selected
m_mode = Volume;
}
else {
m_type = SingleFullObject;
// ensures the correct mode is selected
m_mode = Instance;
}
m_type = SingleFullObject;
// ensures the correct mode is selected
m_mode = Instance;
}
else if (volumes_count == 1) { // instances_count > 1
m_type = SingleFullInstance;