Issue #255: PDF4QT Page Master invert selection does not work

This commit is contained in:
Jakub Melka
2025-03-30 13:47:06 +02:00
parent b2bc121256
commit 11dae337d9
2 changed files with 4 additions and 10 deletions

View File

@ -900,16 +900,9 @@ void MainWindow::performOperation(Operation operation)
case Operation::InvertSelection:
{
QModelIndex rootIndex = ui->documentItemsView->rootIndex();
if (rootIndex.isValid())
{
QModelIndex firstIndex = rootIndex.model()->index(0, 0, rootIndex);
QModelIndex lastIndex = rootIndex.model()->index(rootIndex.model()->rowCount() - 1, 0, rootIndex);
QItemSelection selection(firstIndex, lastIndex);
ui->documentItemsView->selectionModel()->select(selection, QItemSelectionModel::Toggle);
}
QItemSelection selection = ui->documentItemsView->selectionModel()->selection();
ui->documentItemsView->selectAll();
ui->documentItemsView->selectionModel()->select(selection, QItemSelectionModel::Deselect);
break;
}

View File

@ -1,4 +1,5 @@
CURRENT:
- Issue #255: PDF4QT Page Master invert selection does not work
- Issue #254: Unit Settings default window size too small
- Issue #248: update version and year in Help > About page
- Issue #247: option to hide cross when adding annotations