mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
inverse order of active tag selection
This commit is contained in:
parent
31d06f661f
commit
5363521eda
3 changed files with 6 additions and 8 deletions
|
@ -32,9 +32,9 @@ class ActiveTagsChooser(QDialog):
|
|||
self.items.append(item)
|
||||
idx = self.dialog.list.indexFromItem(item)
|
||||
if t in self.suspended:
|
||||
mode = QItemSelectionModel.Deselect
|
||||
else:
|
||||
mode = QItemSelectionModel.Select
|
||||
else:
|
||||
mode = QItemSelectionModel.Deselect
|
||||
self.dialog.list.selectionModel().select(idx, mode)
|
||||
|
||||
def accept(self):
|
||||
|
@ -42,7 +42,7 @@ class ActiveTagsChooser(QDialog):
|
|||
suspended = []
|
||||
for item in self.items:
|
||||
idx = self.dialog.list.indexFromItem(item)
|
||||
if not self.dialog.list.selectionModel().isSelected(idx):
|
||||
if self.dialog.list.selectionModel().isSelected(idx):
|
||||
suspended.append(self.tags[n])
|
||||
n += 1
|
||||
self.parent.deck.suspended = joinTags(suspended + ["Suspended"])
|
||||
|
|
|
@ -266,8 +266,6 @@ class FactEditor(object):
|
|||
if value and not value.strip():
|
||||
widget.setText("")
|
||||
value = u""
|
||||
if self.fact[field.name] == value:
|
||||
return
|
||||
self.fact[field.name] = value
|
||||
self.fact.setModified(textChanged=True)
|
||||
self.deck.setModified()
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>202</width>
|
||||
<height>265</height>
|
||||
<width>248</width>
|
||||
<height>268</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
|
@ -16,7 +16,7 @@
|
|||
<item>
|
||||
<widget class="QLabel" name="label" >
|
||||
<property name="text" >
|
||||
<string><h1>Select Active Tags</h1></string>
|
||||
<string><h1>Select tags to suspend</h1></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Reference in a new issue