RumovZ
17ece47beb
Cache selectionModel().selectedRows()
2021-09-28 11:45:22 +02:00
RumovZ
014220959a
Calculate len_selection depending on modifiers
...
If no modifiers are pressed, a single row has probably been clicked and
`selectedRows()` is fast, while a lot of rows might have been deselcted.
2021-09-28 10:22:20 +02:00
RumovZ
4245a6bbc3
Prefer selectionModel().reset() over .clear()
...
The latter triggers `selectionChanged()` unreliably, probably due to the
aggregation of chronologically close events, causing problems in
tracking `_len_selection`. `reset()` never emits signals.
2021-09-28 10:19:33 +02:00
RumovZ
94eafcf831
Calculate number of selected rows manually
...
`len(self._view.selectionModel().selectedRows())` is slow for large
selections, because Qt queries flags() for every selected cell, so we
calculate the number of selected rows ourselves.
2021-09-27 10:15:53 +02:00
RumovZ
8daecb94e5
Switch to new row before deleting notes
...
The table now properly deselects deleted rows, but that takes effort and
it's more convenient to have a selected row after deleting.
2021-09-25 17:28:38 +02:00
RumovZ
c0616fe820
Handle deleted or restored rows
...
- Cache the result of 'table.len_selection()'
- Update this cache manually when a row was deleted or restored
- Emit 'dataChanged()' after such a change to fix flags not updating
correctly to the shortcut in 'model.flags()'
- Remove/retsore focus if the current element was deleted/restored
2021-09-25 17:16:53 +02:00
RumovZ
053bbe8f01
Only check flags of cached rows
...
Speeds up the selection process (esp. Ctrl+A) by avoiding to fetch rows.
Co-authored-by: BlueGreenMagick <BlueGreenMagick@users.noreply.github.com>
2021-09-25 15:32:22 +02:00
RumovZ
0a95d69735
Add callbacks to row fetching routine
...
Called when a row is detected that has been deleted or restored.
2021-09-25 15:27:19 +02:00
RumovZ
a77c65006f
Check 'index.isValid()' in 'table.model'
2021-09-25 15:21:06 +02:00
Damien Elmes
54ec174453
Merge pull request #1375 from RumovZ/disable-actions
...
Disable unusable browser actions on row change
2021-09-21 18:38:30 +10:00
Damien Elmes
888f02a0f6
Merge pull request #1379 from BlueGreenMagick/dont-fill-empty-on-add-cards
...
set CardLayout fill_empty=False for add cards editor
2021-09-21 15:08:54 +10:00
Damien Elmes
2695cb64ff
add hidden option to disable tooltips in browse screen
...
https://forums.ankiweb.net/t/browser-text-pop-up-when-hovering-over-card-poll/13254
2021-09-21 15:03:37 +10:00
Damien Elmes
916ff49efe
temporary fix for error on deleting ( #1374 )
2021-09-20 22:02:44 +10:00
Damien Elmes
8dde10e83a
add startup message about forcing Wayland
2021-09-20 21:42:16 +10:00
Damien Elmes
c0abcdf647
Revert "Merge pull request #1364 from evandroforks/fix_unclosed_python_file"
...
This reverts commit c05475a49e .
Revert "possible fix for reported audio issues"
This reverts commit e53192a079 .
Reverting in case https://forums.ankiweb.net/t/2-1-48-release-candidate/13268/10
is related to this change. If the issue persists, we'll know this was
not the cause.
2021-09-20 21:39:15 +10:00
bluegreenmagick
1a9e0ec1a0
set CardLayout fill_empty=False for add cards editor
...
Card layout view functions as a previewer in add cards dialog
so displaying accurately is more important than having placeholders.
Especially for card layouts using conditional-not fields {{^Field}}
card layout is rendered badly.
2021-09-20 18:34:49 +09:00
RumovZ
8fd0e89a5a
Disable unusable browser actions on row change
2021-09-17 16:16:34 +02:00
Damien Elmes
e53192a079
possible fix for reported audio issues
...
https://forums.ankiweb.net/t/2-1-48-release-candidate/13268/6
This is the only area of the sound code that has changed since 2.1.47
2021-09-16 10:27:37 +10:00
Henrik Giesel
ca4430d922
Make StickyBottom actually stick and make editor fullsize + flexbox
2021-09-15 15:21:37 +02:00
Henrik Giesel
9ca8e07bbe
Correctly include editable css
2021-09-15 13:32:31 +02:00
Henrik Giesel
5811e59f27
Introduce editable module
2021-09-15 13:32:30 +02:00
Damien Elmes
93202f372c
Merge pull request #1264 from hgiesel/tageditor2
...
Svelte Tag Editor v2
2021-09-15 20:21:16 +10:00
evandrocoan
cdd8b99097
Fix previous card attribute not initialized
2021-09-13 23:16:25 -03:00
Damien Elmes
f55f1fcd21
disable wayland again, but allow enabling it
...
Will add an entry to the known issues page.
2021-09-14 09:53:23 +10:00
Damien Elmes
cb9be3b387
preserve focus on notetype change
...
Closes #1360
2021-09-13 15:31:24 +10:00
Damien Elmes
dba107db74
allow wayland again
...
See #1368
2021-09-13 15:18:32 +10:00
Damien Elmes
2c235ccc70
don't check state of current card when repositioning
...
closes #1365
2021-09-13 14:56:53 +10:00
Damien Elmes
d6552cf14e
Merge pull request #1358 from evandroforks/lastcardinfo
...
Add option to reveal previous card's info
2021-09-13 12:06:10 +10:00
evandrocoan
c1b861a7b0
Add clone stdin to another _process deletion
2021-09-09 18:36:21 -03:00
Henrik Giesel
62e4486008
Remove hiding Qt autocompleter from AddCards
2021-09-09 15:38:10 +02:00
Damien Elmes
c83843812e
add basic tag completion to backend
...
Matches should arrive in alphabetical order. Currently results are not
capped (JS should be able to handle ~1k tags without too much hassle),
and no reordering based on match location is done. Matches are substring
based, and multiple can be provided, eg "foo::bar" will match
"foof::baz::abbar".
This is not hooked up properly on the frontend at the moment -
updateSuggestions() seems to be missing the most recently typed character,
and is not updating the list of completions half the time.
2021-09-09 15:38:08 +02:00
Henrik Giesel
5aa43539a4
Remove Python TagEdit from Editor view
2021-09-09 15:37:48 +02:00
Henrik Giesel
fc5dffbf86
Save tags back to Python
2021-09-09 15:37:47 +02:00
Henrik Giesel
51732b4470
Set tags from Python
2021-09-09 15:37:47 +02:00
Henrik Giesel
d89a6af45f
Port Focus tags shortcut to webview
2021-09-09 15:37:34 +02:00
Henrik Giesel
7f6e7235f1
Display a tag-outline icon in the bottom left
2021-09-09 15:37:33 +02:00
evandrocoan
35ea88e2bb
Use Alt+i for previous/last card info because Ctrl+i could
...
easily confuse a user that Ctrl+i is for the current card.
Ctrl was first added because it is easier to press,
at least for me, then, I press first using Ctrl and if
not available go to Alt.
2021-09-08 21:26:48 -03:00
evandrocoan
14e2d0d102
Fix ResourceWarning: unclosed file <_io.BufferedWriter name=5>
...
https://forums.ankiweb.net/t/aqt-sound-py-resourcewarning-unclosed-file-io-bufferedwriter-name-5/13070
2021-09-08 21:02:12 -03:00
evandrocoan
3c5514d12f
Fix #1355
2021-09-07 23:53:47 -03:00
Ren Tatsumoto
37b00d9ca3
avoid possible performance hit
2021-09-05 16:10:34 +03:00
Ren Tatsumoto
b6e52b929d
fix test complaints
2021-09-05 15:04:24 +03:00
Ren Tatsumoto
ef24288639
Add a hook for modifiying pasted MIME data
2021-09-05 13:52:54 +03:00
Damien Elmes
acda398a2e
quote fonts added via the Add Field dialog
2021-09-02 21:05:16 +10:00
Damien Elmes
5e862c216a
Merge pull request #1349 from RumovZ/rename-with-parents
...
Disable 'Rename with Parents' for top-level items
2021-08-30 22:27:44 +10:00
RumovZ
f1fcd8830d
Disable 'Rename with Parents' for top-level items
2021-08-30 11:10:14 +02:00
RumovZ
e482322f0d
Reset flags when loading a profile...
...
... not only on startup.
2021-08-30 11:07:40 +02:00
Damien Elmes
8d4b38533a
Merge pull request #1344 from glutanimate/add-dialog-manager-hooks
...
Add a hook for subscribing to dialog creation / opening
2021-08-29 11:36:11 +10:00
Damien Elmes
f3b6041e79
Merge pull request #1345 from hgiesel/windowsfocus
...
Use different artificial reviewer button highlight for Windows
2021-08-29 11:35:32 +10:00
Damien Elmes
c0392192c5
more checks for package name
...
Follows up #1343
2021-08-29 11:23:47 +10:00
Henrik Giesel
ff68eb2268
Use different artificial reviewer button highlight for Windows
2021-08-28 21:30:07 +02:00