mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Provide ConcatSeparator through rsbackend.py
This commit is contained in:
parent
c2e2a86ec9
commit
efd554ea29
2 changed files with 4 additions and 3 deletions
|
@ -46,6 +46,7 @@ TagUsnTuple = pb.TagUsnTuple
|
|||
NoteType = pb.NoteType
|
||||
DeckTreeNode = pb.DeckTreeNode
|
||||
StockNoteType = pb.StockNoteType
|
||||
ConcatSeparator = pb.ConcatenateSearchesIn.Separator
|
||||
SyncAuth = pb.SyncAuth
|
||||
SyncOutput = pb.SyncCollectionOut
|
||||
SyncStatus = pb.SyncStatusOut
|
||||
|
|
|
@ -21,7 +21,7 @@ from anki.consts import *
|
|||
from anki.lang import without_unicode_isolation
|
||||
from anki.models import NoteType
|
||||
from anki.notes import Note
|
||||
from anki.rsbackend import DeckTreeNode, InvalidInput, pb
|
||||
from anki.rsbackend import DeckTreeNode, InvalidInput, ConcatSeparator
|
||||
from anki.stats import CardStats
|
||||
from anki.utils import htmlToTextLine, ids2str, isMac, isWin
|
||||
from aqt import AnkiQt, gui_hooks
|
||||
|
@ -1236,13 +1236,13 @@ QTableView {{ gridline-color: {grid} }}
|
|||
elif mods & Qt.ControlModifier:
|
||||
txt = self.col.backend.concatenate_searches(
|
||||
# pylint: disable=no-member
|
||||
sep=pb.ConcatenateSearchesIn.Separator.AND,
|
||||
sep=ConcatSeparator.AND,
|
||||
searches=[cur, txt],
|
||||
)
|
||||
elif mods & Qt.ShiftModifier:
|
||||
txt = self.col.backend.concatenate_searches(
|
||||
# pylint: disable=no-member
|
||||
sep=pb.ConcatenateSearchesIn.Separator.OR,
|
||||
sep=ConcatSeparator.OR,
|
||||
searches=[cur, txt],
|
||||
)
|
||||
except InvalidInput as e:
|
||||
|
|
Loading…
Reference in a new issue