diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-28 15:59:08 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-28 16:05:07 +0200 |
commit | 0e53dd642c44a613fdc1fa683ea373516e67c983 (patch) | |
tree | d3487cf419097a504dc884ddeb937bf9eca70c24 /editor/plugins | |
parent | 14e1f36e614686f3fea0c74fac3624d1027dd5cc (diff) |
Fix MSVC warning C4706: assignment within conditional expression
Part of #66537.
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 8dc08e3a93..84b8b4aed8 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -2535,30 +2535,32 @@ void CanvasItemEditor::_gui_input_viewport(const Ref<InputEvent> &p_event) { bool release_lmb = (mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT); // Required to properly release some stuff (e.g. selection box) while panning. if (EditorSettings::get_singleton()->get("editors/panning/simple_panning") || !pan_pressed || release_lmb) { - if ((accepted = _gui_input_rulers_and_guides(p_event))) { + accepted = true; + if (_gui_input_rulers_and_guides(p_event)) { // print_line("Rulers and guides"); - } else if ((accepted = EditorNode::get_singleton()->get_editor_plugins_over()->forward_gui_input(p_event))) { + } else if (EditorNode::get_singleton()->get_editor_plugins_over()->forward_gui_input(p_event)) { // print_line("Plugin"); - } else if ((accepted = _gui_input_open_scene_on_double_click(p_event))) { + } else if (_gui_input_open_scene_on_double_click(p_event)) { // print_line("Open scene on double click"); - } else if ((accepted = _gui_input_scale(p_event))) { + } else if (_gui_input_scale(p_event)) { // print_line("Set scale"); - } else if ((accepted = _gui_input_pivot(p_event))) { + } else if (_gui_input_pivot(p_event)) { // print_line("Set pivot"); - } else if ((accepted = _gui_input_resize(p_event))) { + } else if (_gui_input_resize(p_event)) { // print_line("Resize"); - } else if ((accepted = _gui_input_rotate(p_event))) { + } else if (_gui_input_rotate(p_event)) { // print_line("Rotate"); - } else if ((accepted = _gui_input_move(p_event))) { + } else if (_gui_input_move(p_event)) { // print_line("Move"); - } else if ((accepted = _gui_input_anchors(p_event))) { + } else if (_gui_input_anchors(p_event)) { // print_line("Anchors"); - } else if ((accepted = _gui_input_select(p_event))) { + } else if (_gui_input_select(p_event)) { // print_line("Selection"); - } else if ((accepted = _gui_input_ruler_tool(p_event))) { + } else if (_gui_input_ruler_tool(p_event)) { // print_line("Measure"); } else { // print_line("Not accepted"); + accepted = false; } } |