Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change behavior when selecting with shift + click #323

Merged
merged 1 commit into from Nov 13, 2020

Conversation

kbengs
Copy link
Member

@kbengs kbengs commented Nov 11, 2020

This is consistent with Nautilus shift-click-select

* Allow to make selection shorter by clicking more towards the cursor
* Toggle selection for single item with (shift) + ctrl + click
@angsch
Copy link
Member

angsch commented Nov 12, 2020

  • The return value is sometimes True, 1 or missing in some branches.

  • I found a case that behaved differently from what I expected.

    1. Load a PDF with 4 pages.
    2. Select all pages through clicking on page 1, holding shift and clicking on page 4.
    3. Remove page 2 from selection by holding Control and clicking on page 2.
    4. Hold shift and click on page 3.

    All pages are selected. I expected that only the pages 1--3 are selected (which is what Nautilus selects). Other than that new selection works really smoothly, nice work.

@kbengs
Copy link
Member Author

kbengs commented Nov 13, 2020

Thank you for testing.

The return value is sometimes True, 1 or missing in some branches.

Yes I know I haven't been consistent with the return value. Documentation I have found say that True should be returned to stop further processing. But 1 also works. I don't know if 1 is a old recommendation.
We still use some of the iconviews built in functions, therefore True or 1 is not always returned. (For example when a page is clicked it is selected and cursor is set there.)

Hold shift and click on page 3

It is behaving like Dolphin in this aspect. When shift is held, what is already selected does not get deselected. Imo this is better. The new drag-select also work the same way: when shift is pressed it does not deselect, but instead it allows you to select more pages.
(The result after step 4 on Nautilus on my machine is that only page 3 is selected)

@angsch
Copy link
Member

angsch commented Nov 13, 2020

It is behaving like Dolphin in this aspect. [...]

(The result after step 4 on Nautilus on my machine is that only page 3 is selected)
The behavior of Nautilus on your system surprises me. I wonder if it is triggered by custom settings or the theme. I had check with Dolphin and in a fresh install I get the behavior you describe. So please ignore my comment.

@jeromerobert jeromerobert added this to the 1.7.0 milestone Nov 13, 2020
@jeromerobert
Copy link
Member

It looks good and ready for merge.

@kbengs kbengs merged commit dbbe5b0 into pdfarranger:master Nov 13, 2020
@kbengs kbengs deleted the shiftClickSelect branch January 10, 2021 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants