summaryrefslogtreecommitdiff
path: root/tools/editor/settings_config_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/settings_config_dialog.cpp')
-rw-r--r--tools/editor/settings_config_dialog.cpp46
1 files changed, 7 insertions, 39 deletions
diff --git a/tools/editor/settings_config_dialog.cpp b/tools/editor/settings_config_dialog.cpp
index ebbc488ff2..3d30b3882d 100644
--- a/tools/editor/settings_config_dialog.cpp
+++ b/tools/editor/settings_config_dialog.cpp
@@ -73,9 +73,6 @@ void EditorSettingsDialog::popup_edit_settings() {
property_editor->edit(EditorSettings::get_singleton());
property_editor->get_property_editor()->update_tree();
- search_box->select_all();
- search_box->grab_focus();
-
popup_centered_ratio(0.7);
}
@@ -248,22 +245,15 @@ void EditorSettingsDialog::_update_plugins() {
}
-void EditorSettingsDialog::_clear_search_box() {
-
- if (search_box->get_text()=="")
- return;
-
- search_box->clear();
- property_editor->get_property_editor()->update_tree();
-}
-
void EditorSettingsDialog::_notification(int p_what) {
if (p_what==NOTIFICATION_ENTER_TREE) {
rescan_plugins->set_icon(get_icon("Reload","EditorIcons"));
- clear_button->set_icon(get_icon("Close","EditorIcons"));
_update_plugins();
+ } else if (p_what==NOTIFICATION_POST_POPUP) {
+
+ property_editor->clear_search_box();
}
}
@@ -275,7 +265,6 @@ void EditorSettingsDialog::_bind_methods() {
ObjectTypeDB::bind_method(_MD("_plugin_settings"),&EditorSettingsDialog::_plugin_settings);
ObjectTypeDB::bind_method(_MD("_plugin_edited"),&EditorSettingsDialog::_plugin_edited);
ObjectTypeDB::bind_method(_MD("_plugin_install"),&EditorSettingsDialog::_plugin_install);
- ObjectTypeDB::bind_method(_MD("_clear_search_box"),&EditorSettingsDialog::_clear_search_box);
}
EditorSettingsDialog::EditorSettingsDialog() {
@@ -286,38 +275,17 @@ EditorSettingsDialog::EditorSettingsDialog() {
add_child(tabs);
set_child_rect(tabs);
- VBoxContainer *vbc = memnew( VBoxContainer );
- tabs->add_child(vbc);
- vbc->set_name("General");
-
- HBoxContainer *hbc = memnew( HBoxContainer );
- hbc->set_h_size_flags(Control::SIZE_EXPAND_FILL);
- vbc->add_child(hbc);
-
- Label *l = memnew( Label );
- l->set_text("Search: ");
- hbc->add_child(l);
-
- search_box = memnew( LineEdit );
- search_box->set_h_size_flags(Control::SIZE_EXPAND_FILL);
- hbc->add_child(search_box);
-
- clear_button = memnew( ToolButton );
- hbc->add_child(clear_button);
- clear_button->connect("pressed",this,"_clear_search_box");
-
property_editor = memnew( SectionedPropertyEditor );
//property_editor->hide_top_label();
- property_editor->get_property_editor()->set_use_filter(true);
- property_editor->get_property_editor()->register_text_enter(search_box);
+ property_editor->set_name("General");
property_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- vbc->add_child(property_editor);
+ tabs->add_child(property_editor);
- vbc = memnew( VBoxContainer );
+ VBoxContainer *vbc = memnew( VBoxContainer );
tabs->add_child(vbc);
vbc->set_name("Plugins");
- hbc = memnew( HBoxContainer );
+ HBoxContainer *hbc = memnew( HBoxContainer );
vbc->add_child(hbc);
hbc->add_child( memnew( Label("Plugin List: ")));
hbc->add_spacer();