summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2016-01-11 08:53:35 +0100
committerRémi Verschelde <remi@verschelde.fr>2016-01-11 08:53:35 +0100
commita8a09f6180399698fbc468f7dcae3da14310e175 (patch)
tree9fb2e1e5abcc0e965811a057f84a00a8f5f762d3 /tools
parent373af4f6206d1c08aca9491da0c91c4c1fab7472 (diff)
parent21b5e9eef47e63201500d6664b01e7766edd48af (diff)
Merge pull request #3302 from MarianoGnu/bug_fixing2
Allow to paste resources in inspector when text_hint indicates multip…
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/property_editor.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp
index d0a37f0c7d..9743dc7202 100644
--- a/tools/editor/property_editor.cpp
+++ b/tools/editor/property_editor.cpp
@@ -727,7 +727,17 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
RES cb=EditorSettings::get_singleton()->get_resource_clipboard();
- bool paste_valid=cb.is_valid() && (hint_text=="" || ObjectTypeDB::is_type(cb->get_type(),hint_text));
+ bool paste_valid=false;
+ if (cb.is_valid()) {
+ if (hint_text=="")
+ paste_valid=true;
+ else
+ for (int i = 0; i < hint_text.get_slice_count(",");i++)
+ if (ObjectTypeDB::is_type(cb->get_type(),hint_text.get_slice(",",i))) {
+ paste_valid=true;
+ break;
+ }
+ }
if (!RES(v).is_null() || paste_valid) {
menu->add_separator();