Merge pull request #116981 from Giganzo/replace-button
Fix replace button doesn't highlight next occurrence
This commit is contained in:
commit
b83356283d
2 changed files with 7 additions and 1 deletions
|
|
@ -699,6 +699,11 @@ void FindReplaceBar::_replace_text_submitted(const String &p_text) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FindReplaceBar::_replace_button_pressed() {
|
||||||
|
_replace();
|
||||||
|
search_next();
|
||||||
|
}
|
||||||
|
|
||||||
void FindReplaceBar::_toggle_replace_pressed() {
|
void FindReplaceBar::_toggle_replace_pressed() {
|
||||||
bool replace_visible = replace_text->is_visible_in_tree();
|
bool replace_visible = replace_text->is_visible_in_tree();
|
||||||
replace_visible ? popup_search(true) : popup_replace();
|
replace_visible ? popup_search(true) : popup_replace();
|
||||||
|
|
@ -843,7 +848,7 @@ FindReplaceBar::FindReplaceBar() {
|
||||||
replace = memnew(Button);
|
replace = memnew(Button);
|
||||||
hbc_button_replace->add_child(replace);
|
hbc_button_replace->add_child(replace);
|
||||||
replace->set_text(TTRC("Replace"));
|
replace->set_text(TTRC("Replace"));
|
||||||
replace->connect(SceneStringName(pressed), callable_mp(this, &FindReplaceBar::_replace));
|
replace->connect(SceneStringName(pressed), callable_mp(this, &FindReplaceBar::_replace_button_pressed));
|
||||||
|
|
||||||
replace_all = memnew(Button);
|
replace_all = memnew(Button);
|
||||||
hbc_button_replace->add_child(replace_all);
|
hbc_button_replace->add_child(replace_all);
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,7 @@ class FindReplaceBar : public HBoxContainer {
|
||||||
void _search_text_changed(const String &p_text);
|
void _search_text_changed(const String &p_text);
|
||||||
void _search_text_submitted(const String &p_text);
|
void _search_text_submitted(const String &p_text);
|
||||||
void _replace_text_submitted(const String &p_text);
|
void _replace_text_submitted(const String &p_text);
|
||||||
|
void _replace_button_pressed();
|
||||||
void _toggle_replace_pressed();
|
void _toggle_replace_pressed();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue