Fix bug help history overwrote by tree item selected call back
This commit is contained in:
parent
e086bccd63
commit
4a59f683d3
@ -406,7 +406,6 @@ void EditorHelp::_class_list_select(const String& p_select) {
|
|||||||
void EditorHelp::_class_desc_select(const String& p_select) {
|
void EditorHelp::_class_desc_select(const String& p_select) {
|
||||||
|
|
||||||
if (p_select.begins_with("#")) {
|
if (p_select.begins_with("#")) {
|
||||||
|
|
||||||
_goto_desc(p_select.substr(1,p_select.length()));
|
_goto_desc(p_select.substr(1,p_select.length()));
|
||||||
return;
|
return;
|
||||||
} else if (p_select.begins_with("@")) {
|
} else if (p_select.begins_with("@")) {
|
||||||
@ -469,9 +468,11 @@ Error EditorHelp::_goto_desc(const String& p_class,bool p_update_history,int p_v
|
|||||||
|
|
||||||
|
|
||||||
if (tree_item_map.has(p_class)) {
|
if (tree_item_map.has(p_class)) {
|
||||||
|
select_locked = true;
|
||||||
tree_item_map[p_class]->select(0);
|
tree_item_map[p_class]->select(0);
|
||||||
class_list->ensure_cursor_is_visible();
|
class_list->ensure_cursor_is_visible();
|
||||||
}
|
}
|
||||||
|
|
||||||
class_desc->show();
|
class_desc->show();
|
||||||
//tabs->set_current_tab(PAGE_CLASS_DESC);
|
//tabs->set_current_tab(PAGE_CLASS_DESC);
|
||||||
edited_class->set_pressed(true);
|
edited_class->set_pressed(true);
|
||||||
@ -497,7 +498,6 @@ Error EditorHelp::_goto_desc(const String& p_class,bool p_update_history,int p_v
|
|||||||
|
|
||||||
class_desc->clear();
|
class_desc->clear();
|
||||||
method_line.clear();
|
method_line.clear();
|
||||||
|
|
||||||
edited_class->set_text(p_class);
|
edited_class->set_text(p_class);
|
||||||
//edited_class->show();
|
//edited_class->show();
|
||||||
|
|
||||||
@ -870,7 +870,7 @@ Error EditorHelp::_goto_desc(const String& p_class,bool p_update_history,int p_v
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorHelp::_request_help(const String& p_string) {
|
void EditorHelp::_request_help(const String& p_string) {
|
||||||
Error err = _goto_desc(p_string);
|
Error err = _goto_desc(p_string);
|
||||||
if (err==OK) {
|
if (err==OK) {
|
||||||
editor->call("_editor_select",3);
|
editor->call("_editor_select",3);
|
||||||
@ -1231,8 +1231,10 @@ void EditorHelp::_notification(int p_what) {
|
|||||||
|
|
||||||
void EditorHelp::_tree_item_selected() {
|
void EditorHelp::_tree_item_selected() {
|
||||||
|
|
||||||
if (select_locked)
|
if (select_locked) {
|
||||||
|
select_locked = false;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
TreeItem *s=class_list->get_selected();
|
TreeItem *s=class_list->get_selected();
|
||||||
if (!s)
|
if (!s)
|
||||||
return;
|
return;
|
||||||
@ -1280,7 +1282,6 @@ EditorHelp::EditorHelp(EditorNode *p_editor) {
|
|||||||
edited_class->hide();
|
edited_class->hide();
|
||||||
b->set_toggle_mode(true);
|
b->set_toggle_mode(true);
|
||||||
b->connect("pressed",this,"_button_pressed",make_binds(PAGE_CLASS_DESC));
|
b->connect("pressed",this,"_button_pressed",make_binds(PAGE_CLASS_DESC));
|
||||||
edited_class->hide();
|
|
||||||
|
|
||||||
b = memnew( Button );
|
b = memnew( Button );
|
||||||
b->set_text("Search in Classes");
|
b->set_text("Search in Classes");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user