summaryrefslogtreecommitdiff
path: root/editor/plugins/spatial_editor_plugin.cpp
diff options
context:
space:
mode:
authorGuilherme Felipe <guilhermefelipecgs@gmail.com>2018-08-14 18:13:48 -0300
committerGuilherme Felipe <guilhermefelipecgs@gmail.com>2018-08-14 19:25:27 -0300
commitae788125a0ef081c99ce7360f689e96b8739db6d (patch)
tree41d0fba539c3b9ba5bea2e713e5a04a043a3c3c4 /editor/plugins/spatial_editor_plugin.cpp
parentbbdb6cf16ead5138bb18cbf435cdecd63bc7d4ab (diff)
Disable camera interpolation when switching scene tabs
Fix #11764
Diffstat (limited to 'editor/plugins/spatial_editor_plugin.cpp')
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index c3d48d498c..9782b9d1f4 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -2081,6 +2081,15 @@ void SpatialEditorViewport::set_message(String p_message, float p_time) {
message_time = p_time;
}
+void SpatialEditorPlugin::edited_scene_changed() {
+ for (int i = 0; i < SpatialEditor::VIEWPORTS_COUNT; i++) {
+ SpatialEditorViewport *viewport = SpatialEditor::get_singleton()->get_editor_viewport(i);
+ if (viewport->is_visible()) {
+ viewport->notification(Control::NOTIFICATION_VISIBILITY_CHANGED);
+ }
+ }
+}
+
void SpatialEditorViewport::_notification(int p_what) {
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {