mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Issue #255: PDF4QT Page Master invert selection does not work
This commit is contained in:
@ -900,16 +900,9 @@ void MainWindow::performOperation(Operation operation)
|
|||||||
|
|
||||||
case Operation::InvertSelection:
|
case Operation::InvertSelection:
|
||||||
{
|
{
|
||||||
QModelIndex rootIndex = ui->documentItemsView->rootIndex();
|
QItemSelection selection = ui->documentItemsView->selectionModel()->selection();
|
||||||
|
ui->documentItemsView->selectAll();
|
||||||
if (rootIndex.isValid())
|
ui->documentItemsView->selectionModel()->select(selection, QItemSelectionModel::Deselect);
|
||||||
{
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
CURRENT:
|
CURRENT:
|
||||||
|
- Issue #255: PDF4QT Page Master invert selection does not work
|
||||||
- Issue #254: Unit Settings default window size too small
|
- Issue #254: Unit Settings default window size too small
|
||||||
- Issue #248: update version and year in Help > About page
|
- Issue #248: update version and year in Help > About page
|
||||||
- Issue #247: option to hide cross when adding annotations
|
- Issue #247: option to hide cross when adding annotations
|
||||||
|
Reference in New Issue
Block a user