mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22: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)
|
self.items.append(item)
|
||||||
idx = self.dialog.list.indexFromItem(item)
|
idx = self.dialog.list.indexFromItem(item)
|
||||||
if t in self.suspended:
|
if t in self.suspended:
|
||||||
mode = QItemSelectionModel.Deselect
|
|
||||||
else:
|
|
||||||
mode = QItemSelectionModel.Select
|
mode = QItemSelectionModel.Select
|
||||||
|
else:
|
||||||
|
mode = QItemSelectionModel.Deselect
|
||||||
self.dialog.list.selectionModel().select(idx, mode)
|
self.dialog.list.selectionModel().select(idx, mode)
|
||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
|
@ -42,7 +42,7 @@ class ActiveTagsChooser(QDialog):
|
||||||
suspended = []
|
suspended = []
|
||||||
for item in self.items:
|
for item in self.items:
|
||||||
idx = self.dialog.list.indexFromItem(item)
|
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])
|
suspended.append(self.tags[n])
|
||||||
n += 1
|
n += 1
|
||||||
self.parent.deck.suspended = joinTags(suspended + ["Suspended"])
|
self.parent.deck.suspended = joinTags(suspended + ["Suspended"])
|
||||||
|
|
|
@ -266,8 +266,6 @@ class FactEditor(object):
|
||||||
if value and not value.strip():
|
if value and not value.strip():
|
||||||
widget.setText("")
|
widget.setText("")
|
||||||
value = u""
|
value = u""
|
||||||
if self.fact[field.name] == value:
|
|
||||||
return
|
|
||||||
self.fact[field.name] = value
|
self.fact[field.name] = value
|
||||||
self.fact.setModified(textChanged=True)
|
self.fact.setModified(textChanged=True)
|
||||||
self.deck.setModified()
|
self.deck.setModified()
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>202</width>
|
<width>248</width>
|
||||||
<height>265</height>
|
<height>268</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle" >
|
<property name="windowTitle" >
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label" >
|
<widget class="QLabel" name="label" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string><h1>Select Active Tags</h1></string>
|
<string><h1>Select tags to suspend</h1></string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Reference in a new issue