Commit 1fa9258
committed
Annotations browser: include custom highlight styles in Restrict to dropdown
The 'Restrict to' dropdown in the Annotations browser only listed
built-in highlight presets (Yellow, Green, Blue, Red, Purple, Wavy,
Strikeout). Custom highlight presets created by the user were not shown.
Two changes:
1. backend.py all_annotation_styles(): scan the database for annotations
whose style has type='custom' and merge those style definitions into
the returned dictionary alongside the built-in styles.
2. annotations.py Restrictions.re_initialize(): use friendly_name from
the style dict as the display label for custom styles, instead of
passing the style name through annotation_title() which is designed
for annotation types, not style names.1 parent 56ef1fc commit 1fa9258
2 files changed
Lines changed: 31 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2638 | 2638 | | |
2639 | 2639 | | |
2640 | 2640 | | |
2641 | | - | |
2642 | | - | |
2643 | | - | |
2644 | | - | |
| 2641 | + | |
| 2642 | + | |
| 2643 | + | |
| 2644 | + | |
| 2645 | + | |
| 2646 | + | |
| 2647 | + | |
| 2648 | + | |
| 2649 | + | |
| 2650 | + | |
| 2651 | + | |
| 2652 | + | |
| 2653 | + | |
| 2654 | + | |
| 2655 | + | |
| 2656 | + | |
| 2657 | + | |
| 2658 | + | |
| 2659 | + | |
| 2660 | + | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
| 2664 | + | |
2645 | 2665 | | |
2646 | 2666 | | |
2647 | 2667 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
870 | 870 | | |
871 | 871 | | |
872 | 872 | | |
873 | | - | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
874 | 880 | | |
875 | 881 | | |
876 | 882 | | |
| |||
0 commit comments