RumovZ
18f0d026b5
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
f54f15cd44
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
3a8c494544
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
73ec0a2b2e
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
2b5bf23bbd
Check 'index.isValid()' in 'table.model'
2021-09-25 15:21:06 +02:00
Damien Elmes
1ceb9965ad
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
RumovZ
51af0ba7d4
Show key of unknown browser columns
2021-07-12 19:03:51 +02:00
RumovZ
5067622751
Add pylib/browser.py for literal config keys
...
Also, remove config bools for sort order.
2021-07-05 12:44:48 +02:00
Damien Elmes
2b8bbda55f
when focusing current card, position at top
...
trying out the changes mentioned on
https://github.com/ankitects/anki/pull/1222#discussion_r648051997
2021-06-09 21:01:29 +10:00
Damien Elmes
c5e56a5fe8
ensure current card centered even if it was already visible
...
Otherwise if a user reviews a card while keeping Browse open, the
card may not be centered if it was already in view.
2021-06-08 16:22:56 +10:00
Damien Elmes
afaaa763ec
don't wait before scrolling to current card
...
https://github.com/ankitects/anki/pull/1222#discussion_r647017566
2021-06-08 12:54:05 +10:00
RumovZ
8a9c9829e8
Change handling of browser's card parameter
...
If a search is provided execute it, else search for current deck.
Then try to select and scroll to the provided card.
2021-06-07 16:42:17 +02:00
Damien Elmes
578b1b0552
Merge pull request #1213 from RumovZ/new-flags
...
Add pink, turquoise and purple flags
2021-06-02 11:22:26 +10:00
Damien Elmes
6e992752ca
prevent error storm when browser table encounters panic
2021-06-02 11:15:39 +10:00
RumovZ
5e7a47fdc7
Rename violet to pink
2021-06-01 18:14:43 +02:00
RumovZ
c97c6c6e98
Add violet, turquoise and purple flags
2021-05-31 12:03:30 +02:00
Damien Elmes
adcdb422c5
config updates by the frontend now skip undo by default
2021-05-24 14:50:46 +10:00
RumovZ
d46fe913a5
Scroll pixels instead of columns horizontally
2021-05-21 18:59:53 +02:00
RumovZ
2290a1652d
Set column sizes and indicator after state change
2021-05-17 20:13:45 +02:00
RumovZ
9ceee90942
Block events when restoring headers
...
Restoring headers after switching states was triggering
_on_column_toggled(), leading to unexpected results.
2021-05-17 20:07:52 +02:00
RumovZ
02f86ec352
Make failed sort column change a no-op
...
The previous behaviour when a non-sortable column was clicked was to
trigger the sorting routine, which was usually a no-op, but would
reorder rows if the configured sort column was hidden.
2021-05-17 18:33:59 +02:00
RumovZ
2000c80fd2
Refactor browser and table into folders
2021-04-12 09:50:44 +02:00