diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-08-11 10:42:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-11 10:42:29 +0200 |
commit | 066fb4d5f9417afffac27a0eb8690f1301cad382 (patch) | |
tree | 832ffbbdcf7a520ea13be3aa43c1ab312a46b5e9 /editor | |
parent | bed66afee4b495e0eaaabdf481c91e75b096f27d (diff) | |
parent | 9d593481f6e66515e93c659c2e9fd1fb05962859 (diff) |
Merge pull request #10238 from Hinsbart/resource_rmb
Inspector: Right click on resource opens sub-menu.
Diffstat (limited to 'editor')
-rw-r--r-- | editor/property_editor.cpp | 6 | ||||
-rw-r--r-- | editor/property_editor.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 438eb2a73f..53d94cdb18 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -3751,6 +3751,10 @@ void PropertyEditor::_item_selected() { selected_property = item->get_metadata(1); } +void PropertyEditor::_item_rmb_edited() { + _custom_editor_request(true); +} + void PropertyEditor::_edit_set(const String &p_name, const Variant &p_value, bool p_refresh_all, const String &p_changed_field) { if (autoclear) { @@ -4247,6 +4251,7 @@ void PropertyEditor::_bind_methods() { ClassDB::bind_method("_item_edited", &PropertyEditor::_item_edited); ClassDB::bind_method("_item_selected", &PropertyEditor::_item_selected); + ClassDB::bind_method("_item_rmb_edited", &PropertyEditor::_item_rmb_edited); ClassDB::bind_method("_item_folded", &PropertyEditor::_item_folded); ClassDB::bind_method("_custom_editor_request", &PropertyEditor::_custom_editor_request); ClassDB::bind_method("_custom_editor_edited", &PropertyEditor::_custom_editor_edited); @@ -4401,6 +4406,7 @@ PropertyEditor::PropertyEditor() { add_child(tree); tree->connect("item_edited", this, "_item_edited", varray(), CONNECT_DEFERRED); + tree->connect("item_rmb_edited", this, "_item_rmb_edited"); tree->connect("cell_selected", this, "_item_selected"); tree->connect("item_collapsed", this, "_item_folded"); diff --git a/editor/property_editor.h b/editor/property_editor.h index 273eff371e..cc507d248f 100644 --- a/editor/property_editor.h +++ b/editor/property_editor.h @@ -209,6 +209,7 @@ class PropertyEditor : public Control { void _custom_editor_request(bool p_arrow); void _item_selected(); + void _item_rmb_edited(); void _item_edited(); TreeItem *get_parent_node(String p_path, HashMap<String, TreeItem *> &item_paths, TreeItem *root, TreeItem *category); |