summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-02-14 13:36:52 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-02-14 13:36:52 +0100
commit56d78c32f7ba2920cdc4598537cf412bcff52b9b (patch)
treed2a320b0958d454c567c754618095e417f6ef1fe
parent34b8f42118d0a0b852c65cdb60ff06a6b8257492 (diff)
parent1d03c2f38933ab7cf84a64c877e93a60494f547b (diff)
Merge pull request #68558 from dzil123/remove_duplicate_wireframe
Node3DEditorViewport - Remove duplicate wireframe check and cleanup
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index b001b4f766..fc1d8936d5 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -3392,7 +3392,6 @@ void Node3DEditorViewport::_menu_option(int p_option) {
VIEW_DISPLAY_SHADELESS,
VIEW_DISPLAY_LIGHTING,
VIEW_DISPLAY_NORMAL_BUFFER,
- VIEW_DISPLAY_WIREFRAME,
VIEW_DISPLAY_DEBUG_SHADOW_ATLAS,
VIEW_DISPLAY_DEBUG_DIRECTIONAL_SHADOW_ATLAS,
VIEW_DISPLAY_DEBUG_VOXEL_GI_ALBEDO,
@@ -3422,7 +3421,6 @@ void Node3DEditorViewport::_menu_option(int p_option) {
Viewport::DEBUG_DRAW_UNSHADED,
Viewport::DEBUG_DRAW_LIGHTING,
Viewport::DEBUG_DRAW_NORMAL_BUFFER,
- Viewport::DEBUG_DRAW_WIREFRAME,
Viewport::DEBUG_DRAW_SHADOW_ATLAS,
Viewport::DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS,
Viewport::DEBUG_DRAW_VOXEL_GI_ALBEDO,
@@ -3445,9 +3443,7 @@ void Node3DEditorViewport::_menu_option(int p_option) {
Viewport::DEBUG_DRAW_MOTION_VECTORS,
};
- int idx = 0;
-
- while (display_options[idx] != VIEW_MAX) {
+ for (int idx = 0; display_options[idx] != VIEW_MAX; idx++) {
int id = display_options[idx];
int item_idx = view_menu->get_popup()->get_item_index(id);
if (item_idx != -1) {
@@ -3461,7 +3457,6 @@ void Node3DEditorViewport::_menu_option(int p_option) {
if (id == p_option) {
viewport->set_debug_draw(debug_draw_modes[idx]);
}
- idx++;
}
} break;
}