Repository: godotengine/godot
File: editor/plugins/node_3d_editor_plugin.cpp (C++)

Code before:
									se->gizmo = Ref<EditorNode3DGizmo>();
								} else {
									se->gizmo = seg;
								}

								seg->redraw();
								spatial_editor->update_transform_gizmo();
								intersected_subgizmo = true;
								break;
							}
						}

						if (intersected_subgizmo) {
							break;
						}
					}

					clicked = ObjectID();

					bool node_selected = get_selected_count() > 0;

					if (after != EditorPlugin::AFTER_GUI_INPUT_CUSTOM && !b->is_alt_pressed()) {
						// Single item selection.
						clicked = _select_ray(b->get_position());

						if (clicked.is_valid() && !editor_selection->is_selected(Object::cast_to<Node>(ObjectDB::get_instance(clicked)))) {
							selection_in_progress = true;
							break;
						}

						if (clicked.is_null()) {
							// Default to region select.
							cursor.region_select = true;
							cursor.region_begin = b->get_position();
							cursor.region_end = b->get_position();
							break;
						}
					}

					if (!clicked_wants_append && node_selected && ((spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_SELECT && b->is_command_or_control_pressed()) || spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_ROTATE)) {
						begin_transform(TRANSFORM_ROTATE, false);
						break;
					}

					if (!clicked_wants_append && node_selected && spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_MOVE) {
						begin_transform(TRANSFORM_TRANSLATE, false);
						break;
					}

					if (!clicked_wants_append && node_selected && spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_SCALE) {
						begin_transform(TRANSFORM_SCALE, false);

Review comment (suggestion):
```suggestion
						if (clicked.is_valid() && !editor_selection->is_selected(ObjectDB::get_instance<Node>(clicked))) {
```
New preferred syntax 

Code after:
									se->gizmo = Ref<EditorNode3DGizmo>();
								} else {
									se->gizmo = seg;
								}

								seg->redraw();
								spatial_editor->update_transform_gizmo();
								intersected_subgizmo = true;
								break;
							}
						}

						if (intersected_subgizmo) {
							break;
						}
					}

					clicked = ObjectID();

					bool node_selected = get_selected_count() > 0;

					if (after != EditorPlugin::AFTER_GUI_INPUT_CUSTOM && !b->is_alt_pressed()) {
						// Single item selection.
						clicked = _select_ray(b->get_position());

						if (clicked.is_valid() && !editor_selection->is_selected(ObjectDB::get_instance<Node>(clicked))) {
							selection_in_progress = true;
							break;
						}

						if (clicked.is_null()) {
							// Default to region select.
							cursor.region_select = true;
							cursor.region_begin = b->get_position();
							cursor.region_end = b->get_position();
							break;
						}
					}

					if (!clicked_wants_append && node_selected && ((spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_SELECT && b->is_command_or_control_pressed()) || spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_ROTATE)) {
						begin_transform(TRANSFORM_ROTATE, false);
						break;
					}

					if (!clicked_wants_append && node_selected && spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_MOVE) {
						begin_transform(TRANSFORM_TRANSLATE, false);
						break;
					}

					if (!clicked_wants_append && node_selected && spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_SCALE) {
						begin_transform(TRANSFORM_SCALE, false);