diff --git a/Pdf4QtPageMaster/mainwindow.cpp b/Pdf4QtPageMaster/mainwindow.cpp index ccba902..e94f2db 100644 --- a/Pdf4QtPageMaster/mainwindow.cpp +++ b/Pdf4QtPageMaster/mainwindow.cpp @@ -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; } diff --git a/RELEASES.txt b/RELEASES.txt index 24e2e54..ed7cb1e 100644 --- a/RELEASES.txt +++ b/RELEASES.txt @@ -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