소스 검색

Merge pull request #35229 from lakshay-angrish/35090-methods-in-xml-not-in-editor

show parametric setters and getters in editor help
Rémi Verschelde 5 년 전
부모
커밋
0aefec2454
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      editor/editor_help.cpp

+ 5 - 2
editor/editor_help.cpp

@@ -603,8 +603,11 @@ void EditorHelp::_update_doc() {
 	Vector<DocData::MethodDoc> methods;
 
 	for (int i = 0; i < cd.methods.size(); i++) {
-		if (skip_methods.has(cd.methods[i].name))
-			continue;
+		if (skip_methods.has(cd.methods[i].name)) {
+			if (cd.methods[i].arguments.size() == 0 /* getter */ || (cd.methods[i].arguments.size() == 1 && cd.methods[i].return_type == "void" /* setter */)) {
+				continue;
+			}
+		}
 		methods.push_back(cd.methods[i]);
 	}