- fix: batch replace in file doesn't respect item check states in the find panel

This commit is contained in:
Roy Qu 2022-03-11 21:12:44 +08:00
parent 416023dc60
commit c563a32be1
4 changed files with 4 additions and 2 deletions

View File

@ -5,6 +5,7 @@ Red Panda C++ Version 1.0.0
- enhancement: adjust tab order in the find dialog
- enhancement: highlight hits in the find panel's result list
- enhancement: optimize startup time
- fix: batch replace in file doesn't respect item check states in the find panel
Red Panda C++ Version 0.14.5
- fix: the "gnu c++ 20" option in compiler set options is wrong

View File

@ -6035,6 +6035,8 @@ void MainWindow::on_btnReplace_clicked()
contents = editor->contents();
for (int i=file->results.count()-1;i>=0;i--) {
const PSearchResultTreeItem& item = file->results[i];
if (!item->selected)
continue;
QString line = contents[item->line-1];
if (line.mid(item->start-1,results->keyword.length())!=results->keyword) {
QMessageBox::critical(editor,

View File

@ -542,7 +542,7 @@
<enum>QTabWidget::South</enum>
</property>
<property name="currentIndex">
<number>6</number>
<number>3</number>
</property>
<property name="iconSize">
<size>

View File

@ -311,7 +311,6 @@ bool SearchResultTreeModel::setData(const QModelIndex &index, const QVariant &va
if (!item)
return false;
if (role == Qt::CheckStateRole && mSelectable) {
PSearchResults results = mSearchResultModel->currentResults();
if (!results || !index.isValid() ) {