summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2015-11-24 23:00:31 +0100
committerRémi Verschelde <remi@verschelde.fr>2015-11-24 23:00:31 +0100
commit36ef5cd7bc966ff8af2a275fd1fd5ae639f9cc76 (patch)
tree44fb4f3139658c3b58c40fbd8b78999b05d6f2a3
parentc731dd1ba68604ff7e97915e2b9d3011e818ca03 (diff)
parentc591293718a3710f5d18a2d09a57974df38696cb (diff)
Merge pull request #2906 from neikeq/help_last_search
Remember last search help term
-rw-r--r--tools/editor/editor_help.cpp8
-rw-r--r--tools/editor/editor_help.h3
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp2
3 files changed, 11 insertions, 2 deletions
diff --git a/tools/editor/editor_help.cpp b/tools/editor/editor_help.cpp
index 808199e175..8fd99cc25a 100644
--- a/tools/editor/editor_help.cpp
+++ b/tools/editor/editor_help.cpp
@@ -36,6 +36,14 @@
#include "os/keyboard.h"
+void EditorHelpSearch::popup() {
+ popup_centered_ratio(0.6);
+ if (search_box->get_text()!="") {
+ search_box->select_all();
+ _update_search();
+ }
+ search_box->grab_focus();
+}
void EditorHelpSearch::popup(const String& p_term) {
diff --git a/tools/editor/editor_help.h b/tools/editor/editor_help.h
index b5ee6eca6c..04ac4d35ff 100644
--- a/tools/editor/editor_help.h
+++ b/tools/editor/editor_help.h
@@ -68,7 +68,8 @@ protected:
static void _bind_methods();
public:
- void popup(const String& p_term="");
+ void popup();
+ void popup(const String& p_term);
EditorHelpSearch();
};
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index 65ed420a51..6413ca1269 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -881,7 +881,7 @@ void ScriptEditor::_menu_option(int p_option) {
} break;
case SEARCH_HELP: {
- help_search_dialog->popup("current");
+ help_search_dialog->popup();
} break;
case SEARCH_CLASSES: {