diff options
Diffstat (limited to 'tools/editor/property_editor.cpp')
-rw-r--r-- | tools/editor/property_editor.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp index fc5fce1d47..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(); @@ -3812,6 +3822,11 @@ void SectionedPropertyEditor::_section_selected(int p_which) { filter->set_section( sections->get_item_metadata(p_which) ); } +String SectionedPropertyEditor::get_current_section() const { + + return sections->get_item_metadata( sections->get_current() ); +} + String SectionedPropertyEditor::get_full_item_path(const String& p_item) { String base = sections->get_item_metadata( sections->get_current() ); |