summaryrefslogtreecommitdiff
path: root/editor/property_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/property_editor.cpp')
-rw-r--r--editor/property_editor.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 1691ce3a63..e6128f255d 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -176,9 +176,9 @@ void CustomPropertyEditor::_menu_option(int p_which) {
case OBJ_MENU_EDIT: {
- RefPtr RefPtr = v;
+ REF r = v;
- if (!RefPtr.is_null()) {
+ if (!r.is_null()) {
emit_signal("resource_edit_request");
hide();
@@ -193,8 +193,7 @@ void CustomPropertyEditor::_menu_option(int p_which) {
case OBJ_MENU_MAKE_UNIQUE: {
- RefPtr RefPtr = v;
- Ref<Resource> res_orig = RefPtr;
+ Ref<Resource> res_orig = v;
if (res_orig.is_null())
return;
@@ -229,7 +228,7 @@ void CustomPropertyEditor::_menu_option(int p_which) {
res->set(p.first, p.second);
}
- v = res.get_ref_ptr();
+ v = res;
emit_signal("variant_changed");
hide();
} break;
@@ -311,7 +310,7 @@ void CustomPropertyEditor::_menu_option(int p_which) {
res->call("set_instance_base_type", owner->get_class());
}
- v = Ref<Resource>(res).get_ref_ptr();
+ v = res;
emit_signal("variant_changed");
} break;
@@ -1103,7 +1102,7 @@ void CustomPropertyEditor::_file_selected(String p_file) {
error->popup_centered_minsize();
break;
}
- v = res.get_ref_ptr();
+ v = res;
emit_signal("variant_changed");
hide();
} break;
@@ -1168,7 +1167,7 @@ void CustomPropertyEditor::_type_create_selected(int p_idx) {
Resource *res = Object::cast_to<Resource>(obj);
ERR_FAIL_COND(!res);
- v = Ref<Resource>(res).get_ref_ptr();
+ v = res;
emit_signal("variant_changed");
hide();
}
@@ -1373,7 +1372,7 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
Resource *res = Object::cast_to<Resource>(obj);
ERR_BREAK(!res);
- v = Ref<Resource>(res).get_ref_ptr();
+ v = res;
emit_signal("variant_changed");
hide();
}
@@ -1395,9 +1394,9 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
} else if (p_which == 2) {
- RefPtr RefPtr = v;
+ RES r = v;
- if (!RefPtr.is_null()) {
+ if (!r.is_null()) {
emit_signal("resource_edit_request");
hide();
@@ -1410,8 +1409,7 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
hide();
} else if (p_which == 4) {
- RefPtr RefPtr = v;
- Ref<Resource> res_orig = RefPtr;
+ Ref<Resource> res_orig = v;
if (res_orig.is_null())
return;
@@ -1442,7 +1440,7 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
res->set(p.first, p.second);
}
- v = res.get_ref_ptr();
+ v = res;
emit_signal("variant_changed");
hide();
}