summaryrefslogtreecommitdiffstats
path: root/editor/plugins/path_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/path_editor_plugin.cpp')
-rw-r--r--editor/plugins/path_editor_plugin.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/editor/plugins/path_editor_plugin.cpp b/editor/plugins/path_editor_plugin.cpp
index c32ed1064f..96a98f3c48 100644
--- a/editor/plugins/path_editor_plugin.cpp
+++ b/editor/plugins/path_editor_plugin.cpp
@@ -222,8 +222,10 @@ void PathSpatialGizmo::redraw() {
//v3p.push_back(r[i]+Vector3(0,0.2,0));
}
- add_lines(v3p, PathEditorPlugin::singleton->path_material);
- add_collision_segments(v3p);
+ if (v3p.size() > 1) {
+ add_lines(v3p, PathEditorPlugin::singleton->path_material);
+ add_collision_segments(v3p);
+ }
if (PathEditorPlugin::singleton->get_edited_path() == path) {
v3p.clear();
@@ -247,9 +249,15 @@ void PathSpatialGizmo::redraw() {
}
}
- add_lines(v3p, PathEditorPlugin::singleton->path_thin_material);
- add_handles(handles);
- add_handles(sec_handles, false, true);
+ if (v3p.size() > 1) {
+ add_lines(v3p, PathEditorPlugin::singleton->path_thin_material);
+ }
+ if (handles.size()) {
+ add_handles(handles);
+ }
+ if (sec_handles.size()) {
+ add_handles(sec_handles, false, true);
+ }
}
}