summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-02-10 19:34:55 +0100
committerGitHub <noreply@github.com>2020-02-10 19:34:55 +0100
commit506135671cb1ed7607ee8c3affe56adc84c626c8 (patch)
tree65c5ba69c7b1e1aeb1a5d587fb264c86ca5e3908 /editor/plugins
parent2dd73b1ffad10824a9f66e3ac04f4e2a7d51a85e (diff)
parentb66d45d986fd7e25f300db2bd2730987de6210fc (diff)
Merge pull request #36082 from groud/fix_crash_2D_editor
Fixes a crash in the 2D editor
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 1024e853be..054c7741ba 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -1989,7 +1989,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
if (selection.size() > 0) {
drag_type = DRAG_MOVE;
- CanvasItem *canvas_item = drag_selection[0];
+ CanvasItem *canvas_item = selection[0];
Transform2D parent_xform = canvas_item->get_global_transform_with_canvas() * canvas_item->get_transform().affine_inverse();
Transform2D unscaled_transform = (transform * parent_xform * canvas_item->_edit_get_transform()).orthonormalized();
Transform2D simple_xform = viewport->get_transform() * unscaled_transform;