aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorJuan Linietsky2017-08-08 07:13:17 -0300
committerRémi Verschelde2017-08-13 20:29:46 +0200
commit670d07ca0dbf9add2d8a96cd2a3f14b99be9cd23 (patch)
treeaac24f9d91319de87f914bd9d55631f8a8e87706 /editor/plugins
parentd6869d62603db9242ad40735d85d803242607e71 (diff)
downloadgodot-670d07ca0dbf9add2d8a96cd2a3f14b99be9cd23.tar.gz
godot-670d07ca0dbf9add2d8a96cd2a3f14b99be9cd23.tar.zst
godot-670d07ca0dbf9add2d8a96cd2a3f14b99be9cd23.zip
Attempt to resolve #4673
(cherry picked from commit 1939e83a653b3263eeac820a9e36d751a314068b)
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index fabb67e31..d50465559 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -1459,10 +1459,12 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent &p_event) {
while ((n && n != scene && n->get_owner() != scene) || (n && !n->is_type("CanvasItem"))) {
n = n->get_parent();
};
- c = n->cast_to<CanvasItem>();
-#if 0
- if ( b.pressed ) box_selection_start( click );
-#endif
+
+ if (n) {
+ c = n->cast_to<CanvasItem>();
+ } else {
+ c = NULL;
+ }
additive_selection = b.mod.shift;
if (!_select(c, click, additive_selection))