Allow empty replacement texts in the Find in Files replace dialog

This closes #29026.
This commit is contained in:
Hugo Locurcio 2019-05-20 14:43:42 +02:00
parent 6110bdee13
commit a411067829
No known key found for this signature in database
GPG Key ID: 39E8F8BE30B0A49C
1 changed files with 1 additions and 2 deletions

View File

@ -751,7 +751,6 @@ void FindInFilesPanel::_on_replace_text_changed(String text) {
void FindInFilesPanel::_on_replace_all_clicked() { void FindInFilesPanel::_on_replace_all_clicked() {
String replace_text = get_replace_text(); String replace_text = get_replace_text();
ERR_FAIL_COND(replace_text.empty());
PoolStringArray modified_files; PoolStringArray modified_files;
@ -887,7 +886,7 @@ String FindInFilesPanel::get_replace_text() {
void FindInFilesPanel::update_replace_buttons() { void FindInFilesPanel::update_replace_buttons() {
String text = get_replace_text(); String text = get_replace_text();
bool disabled = text.empty() || _finder->is_searching(); bool disabled = _finder->is_searching();
_replace_all_button->set_disabled(disabled); _replace_all_button->set_disabled(disabled);
} }