瀏覽代碼

Merge pull request #6978 from volzhs/dup-search-menu

Fix 2 search menus are shown
Rémi Verschelde 8 年之前
父節點
當前提交
2001e0f75f
共有 1 個文件被更改,包括 6 次插入11 次删除
  1. 6 11
      tools/editor/plugins/script_editor_plugin.cpp

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

@@ -1909,19 +1909,14 @@ void ScriptEditor::_update_selected_editor_menu() {
 				se->get_edit_menu()->hide();
 		}
 
-		EditorHelp *eh = tab_container->get_child(i)->cast_to<EditorHelp>();
-
-		if (eh) {
-
-			if (current)
-				script_search_menu->show();
-			else
-				script_search_menu->hide();
-		}
-
-
 	}
 
+	EditorHelp *eh=tab_container->get_current_tab_control()->cast_to<EditorHelp>();
+	if (eh) {
+		script_search_menu->show();
+	} else {
+		script_search_menu->hide();
+	}
 }
 
 void ScriptEditor::_update_history_pos(int p_new_pos) {