Merge pull request #109490 from ryevdokimov/move-rotation-lock
Move `Lock View Rotation` label logic out of process notification
This commit is contained in:
@ -3433,11 +3433,6 @@ void Node3DEditorViewport::_notification(int p_what) {
|
|||||||
frame_time_gradient->get_color_at_offset(
|
frame_time_gradient->get_color_at_offset(
|
||||||
Math::remap(fps, 110, 10, 0, 1)));
|
Math::remap(fps, 110, 10, 0, 1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lock_rotation) {
|
|
||||||
float locked_half_width = locked_label->get_size().width / 2.0f;
|
|
||||||
locked_label->set_anchor_and_offset(SIDE_LEFT, 0.5f, -locked_half_width);
|
|
||||||
}
|
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case NOTIFICATION_PHYSICS_PROCESS: {
|
case NOTIFICATION_PHYSICS_PROCESS: {
|
||||||
@ -4306,6 +4301,12 @@ void Node3DEditorViewport::_update_centered_labels() {
|
|||||||
float cinema_half_width = cinema_label->get_size().width / 2.0f;
|
float cinema_half_width = cinema_label->get_size().width / 2.0f;
|
||||||
cinema_label->set_anchor_and_offset(SIDE_LEFT, 0.5f, -cinema_half_width);
|
cinema_label->set_anchor_and_offset(SIDE_LEFT, 0.5f, -cinema_half_width);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (locked_label->is_visible()) {
|
||||||
|
locked_label->reset_size();
|
||||||
|
float locked_half_width = locked_label->get_size().width / 2.0f;
|
||||||
|
locked_label->set_anchor_and_offset(SIDE_LEFT, 0.5f, -locked_half_width);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Node3DEditorViewport::_init_gizmo_instance(int p_idx) {
|
void Node3DEditorViewport::_init_gizmo_instance(int p_idx) {
|
||||||
|
|||||||
Reference in New Issue
Block a user