diff options
| author | Hubert Jarosz | 2016-03-01 00:08:33 +0100 |
|---|---|---|
| committer | Hubert Jarosz | 2016-03-09 00:18:23 +0100 |
| commit | 7b07bcaf449ea6cf52c2ac501e48cddbe4bde035 (patch) | |
| tree | 5d5c2abcc801262b72f02f5e9c7c70a20c729e73 /tools/editor/plugins/spatial_editor_plugin.cpp | |
| parent | bf7f9244a95962c9833e68743726fe83a00b732c (diff) | |
| download | godot-7b07bcaf449ea6cf52c2ac501e48cddbe4bde035.tar.gz godot-7b07bcaf449ea6cf52c2ac501e48cddbe4bde035.tar.zst godot-7b07bcaf449ea6cf52c2ac501e48cddbe4bde035.zip | |
Diffstat (limited to 'tools/editor/plugins/spatial_editor_plugin.cpp')
| -rw-r--r-- | tools/editor/plugins/spatial_editor_plugin.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp index e787c7470..79ff78ca0 100644 --- a/tools/editor/plugins/spatial_editor_plugin.cpp +++ b/tools/editor/plugins/spatial_editor_plugin.cpp @@ -2084,7 +2084,9 @@ void SpatialEditorViewport::_menu_option(int p_option) { count++; } - center/=float(count); + if( count != 0 ) { + center/=float(count); + } cursor.pos=center; } break; @@ -4240,6 +4242,3 @@ SpatialEditorPlugin::SpatialEditorPlugin(EditorNode *p_node) { SpatialEditorPlugin::~SpatialEditorPlugin() { } - - - |
