浏览代码

Merge pull request #2907 from neikeq/fix_2887

Fix Class Search dialog not showing
Rémi Verschelde 9 年之前
父节点
当前提交
5db398f67f
共有 1 个文件被更改,包括 5 次插入6 次删除
  1. 5 6
      tools/editor/plugins/script_editor_plugin.cpp

+ 5 - 6
tools/editor/plugins/script_editor_plugin.cpp

@@ -885,14 +885,13 @@ void ScriptEditor::_menu_option(int p_option) {
 		} break;
 		case SEARCH_CLASSES: {
 
-			if (tab_container->get_tab_count()==0)
-				break;
-
 			String current;
 
-			EditorHelp *eh = tab_container->get_child( tab_container->get_current_tab() )->cast_to<EditorHelp>();
-			if (eh) {
-				current=eh->get_class_name();
+			if (tab_container->get_tab_count()>0) {
+				EditorHelp *eh = tab_container->get_child( tab_container->get_current_tab() )->cast_to<EditorHelp>();
+				if (eh) {
+					current=eh->get_class_name();
+				}
 			}
 
 			help_index->popup_centered_ratio(0.6);