summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-10-20 09:23:28 +0200
committerGitHub <noreply@github.com>2021-10-20 09:23:28 +0200
commitb1b9b6ac6f9860c8696912ffb8b5b078bcf47f73 (patch)
tree581183bb2405cde2359a52ddd1c755379366d8de
parent62b42b02694fc115c8f71071139e2f085b35bf5f (diff)
parent392d529247cf64913404b948bb6b87d63be2850f (diff)
Merge pull request #54014 from timothyqiu/view-name
Update view name after processing orbit view shortcuts
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 32a8bbf406..0096152cfe 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -2228,18 +2228,28 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
if (ED_IS_SHORTCUT("spatial_editor/orbit_view_down", p_event)) {
cursor.x_rot -= Math_PI / 12.0;
+ view_type = VIEW_TYPE_USER;
+ _update_name();
}
if (ED_IS_SHORTCUT("spatial_editor/orbit_view_up", p_event)) {
cursor.x_rot += Math_PI / 12.0;
+ view_type = VIEW_TYPE_USER;
+ _update_name();
}
if (ED_IS_SHORTCUT("spatial_editor/orbit_view_right", p_event)) {
cursor.y_rot -= Math_PI / 12.0;
+ view_type = VIEW_TYPE_USER;
+ _update_name();
}
if (ED_IS_SHORTCUT("spatial_editor/orbit_view_left", p_event)) {
cursor.y_rot += Math_PI / 12.0;
+ view_type = VIEW_TYPE_USER;
+ _update_name();
}
if (ED_IS_SHORTCUT("spatial_editor/orbit_view_180", p_event)) {
cursor.y_rot += Math_PI;
+ view_type = VIEW_TYPE_USER;
+ _update_name();
}
if (ED_IS_SHORTCUT("spatial_editor/focus_origin", p_event)) {
_menu_option(VIEW_CENTER_TO_ORIGIN);