mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -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
|
NoteType = pb.NoteType
|
||||||
DeckTreeNode = pb.DeckTreeNode
|
DeckTreeNode = pb.DeckTreeNode
|
||||||
StockNoteType = pb.StockNoteType
|
StockNoteType = pb.StockNoteType
|
||||||
|
ConcatSeparator = pb.ConcatenateSearchesIn.Separator
|
||||||
SyncAuth = pb.SyncAuth
|
SyncAuth = pb.SyncAuth
|
||||||
SyncOutput = pb.SyncCollectionOut
|
SyncOutput = pb.SyncCollectionOut
|
||||||
SyncStatus = pb.SyncStatusOut
|
SyncStatus = pb.SyncStatusOut
|
||||||
|
|
|
@ -21,7 +21,7 @@ from anki.consts import *
|
||||||
from anki.lang import without_unicode_isolation
|
from anki.lang import without_unicode_isolation
|
||||||
from anki.models import NoteType
|
from anki.models import NoteType
|
||||||
from anki.notes import Note
|
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.stats import CardStats
|
||||||
from anki.utils import htmlToTextLine, ids2str, isMac, isWin
|
from anki.utils import htmlToTextLine, ids2str, isMac, isWin
|
||||||
from aqt import AnkiQt, gui_hooks
|
from aqt import AnkiQt, gui_hooks
|
||||||
|
@ -1236,13 +1236,13 @@ QTableView {{ gridline-color: {grid} }}
|
||||||
elif mods & Qt.ControlModifier:
|
elif mods & Qt.ControlModifier:
|
||||||
txt = self.col.backend.concatenate_searches(
|
txt = self.col.backend.concatenate_searches(
|
||||||
# pylint: disable=no-member
|
# pylint: disable=no-member
|
||||||
sep=pb.ConcatenateSearchesIn.Separator.AND,
|
sep=ConcatSeparator.AND,
|
||||||
searches=[cur, txt],
|
searches=[cur, txt],
|
||||||
)
|
)
|
||||||
elif mods & Qt.ShiftModifier:
|
elif mods & Qt.ShiftModifier:
|
||||||
txt = self.col.backend.concatenate_searches(
|
txt = self.col.backend.concatenate_searches(
|
||||||
# pylint: disable=no-member
|
# pylint: disable=no-member
|
||||||
sep=pb.ConcatenateSearchesIn.Separator.OR,
|
sep=ConcatSeparator.OR,
|
||||||
searches=[cur, txt],
|
searches=[cur, txt],
|
||||||
)
|
)
|
||||||
except InvalidInput as e:
|
except InvalidInput as e:
|
||||||
|
|
Loading…
Reference in a new issue