diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-05-17 07:36:47 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-05-17 07:37:45 -0300 |
commit | 98a329670227c726a5d7a196e5cba8dbdd54301b (patch) | |
tree | 7346f7a3e38eb35b784ac1a68a227d07cc8881b4 /editor/editor_node.cpp | |
parent | d801ff2b3db2de105c1b36a74ce116e360143d4e (diff) |
Removal of Image from Variant, converted to a Resource.
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r-- | editor/editor_node.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 698066f188..f0152b4be2 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -4463,8 +4463,9 @@ Variant EditorNode::drag_resource(const Ref<Resource> &p_res, Control *p_from) { { //todo make proper previews Ref<ImageTexture> pic = gui_base->get_icon("FileBig", "EditorIcons"); - Image img = pic->get_data(); - img.resize(48, 48); //meh + Ref<Image> img = pic->get_data(); + img = img->duplicate(); + img->resize(48, 48); //meh Ref<ImageTexture> resized_pic = Ref<ImageTexture>(memnew(ImageTexture)); resized_pic->create_from_image(img); preview = resized_pic; |