Comments (6)
I've look into it and it seems like this is just how QAbstractItemView::ExtendedSelection
works. Basically the last item you click becomes the current item, and when you shift-click another item, all the items from the current item to the item you clicked have their selections flipped.
You can work around this in several ways:
- Click the first item you wish to select, then shift-click the second item you wish to select. This will always produce the behavior you expect.
- Click and drag from the starting item to the ending item.
- Ctrl-click the items you wish to select.
I'm temped to put a wontfix on this just because it doesn't seem like a trivial fix from what I've read so far.
The other option is to use QAbstractItemView::MultiSelection
which disables shift-clicking entirely. I find it more annoying to use, though, so I probably not going to do that.
You can read more here:
https://doc.qt.io/qt-5/qabstractitemview.html#SelectionMode-enum
from memento.
Hmm...but at the beginning of the gif, when the highlight is on 897 (し… しかし 今回の計画は\n各国の注目を集めており―
), why does shift clicking on 898 (共和国側も\n我々の情報を欲しています
) select all the way down to 900?
Edit: I wonder if you mean that the currently highlighted subtitle is not the current item unless I click on it first. But this was not the behavior before. It reminds me that post my PR and your refractor of subtitlelistwidget
, because there are now multiple entries to highlight if they are all on screen, we have switched to setting the QTableWidgetItem
s selected, instead of table->setCurrentItem(subtitleItem)
on the one (flattened) item. Perhaps this is causing the issue?
I agree this might not be a trivial fix because as I tried setting the current item clears selections.
from memento.
If the user presses the Shift key while clicking on an item, all items between the current item and the clicked item are selected or unselected, depending on the state of the clicked item.
It's important to note that the current item and selected items aren't necessarily the same.
For some reason though it seems like the current item that is reported programmatically is not the item deciding where shift-clicking starts from contrary to what the documentation says. Rather the last item that was clicked is the item where shift-clicking is anchored to. Seems like a bug in Qt, which if it is, I can't fix it.
from memento.
I tried something else. Seems to work well. It's up on master.
from memento.
I've tested the last fix I put out quite a bit and the issue seems fixed. If there continues to be any problems, feel free to reopen the issue.
from memento.
Thank you! Works really great.
from memento.
Related Issues (20)
- Error adding term Operation canceled HOT 12
- Subtitle search only works when media is paused HOT 3
- [Feature request] Export only lowest frequency value HOT 1
- Memento fills empty fields with html HOT 1
- Play audio doesn't work HOT 1
- Can't open on MAC M3 Arm HOT 5
- what settings are needed for YouTube links to work? HOT 4
- Kanji Stroke Order font HOT 1
- [Feature Request] Glossary Selection Marker HOT 12
- [Feature Request] Subtitle Delay HOT 3
- MeCab UniDic support HOT 3
- QT6 migration causes subtitle position to shift when on screen controller is shown/hidden HOT 1
- Lack of Styling on Anki Cards Added via Memento HOT 4
- jp mining note support HOT 2
- Setting secondary_sub_visibility to 'auto' within the mpvacious plugin does not work HOT 2
- Any configuration guide? HOT 1
- Jellyfin mpv shim? HOT 1
- Video does not play HOT 3
- Improve popup dictionary styling HOT 3
- Partially visible video when using display scaling HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from memento.