From 9c95b9bd854e953e75ac34f2fbcd28e0e7fd0160 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 2 May 2016 12:36:10 -0400 Subject: Adjust the single-replace logic in lumina-textedit. Have it replace the current selection match, and find the next one (don't replace the next one until the user can see it highlighted first). --- src-qt5/desktop-utils/lumina-textedit/MainUI.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-textedit/MainUI.cpp') diff --git a/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp b/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp index 7425b399..b5d65559 100644 --- a/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp @@ -300,16 +300,16 @@ void MainUI::replaceOne(){ bool done = false; if(cur->textCursor().selectedText()==ui->line_find->text()){ cur->insertPlainText(ui->line_replace->text()); - done = true; - }else{ + //done = true; + }//else{ //Find/replace the next occurance of the string bool found = cur->find( ui->line_find->text(), ui->tool_find_casesensitive->isChecked() ? QTextDocument::FindCaseSensitively : QTextDocument::FindFlags() ); - if(found){ cur->insertPlainText(ui->line_replace->text()); done = true;} - } - if(done){ + //if(found){ cur->insertPlainText(ui->line_replace->text()); done = true;} + //} + /*if(done){ //Re-highlight the newly-inserted text cur->find( ui->line_replace->text(), QTextDocument::FindCaseSensitively | QTextDocument::FindBackward); - } + }*/ } void MainUI::replaceAll(){ -- cgit