mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
modalize gencards & change model
This commit is contained in:
parent
fdeb092a8d
commit
b770768a77
3 changed files with 39 additions and 17 deletions
|
@ -1094,8 +1094,9 @@ class GenCards(QDialog):
|
|||
QDialog.__init__(self, browser)
|
||||
self.browser = browser
|
||||
self.fids = fids
|
||||
self.form = aqt.forms.addcardmodels.Ui_Dialog()
|
||||
self.form = aqt.forms.gencards.Ui_Dialog()
|
||||
self.form.setupUi(self)
|
||||
self.setWindowModality(Qt.WindowModal)
|
||||
self.connect(self.form.buttonBox, SIGNAL("helpRequested()"),
|
||||
self.onHelp)
|
||||
restoreGeom(self, "addCardModels")
|
||||
|
@ -1156,6 +1157,7 @@ class ChangeModel(QDialog):
|
|||
self.oldModel = browser.card.fact().model()
|
||||
self.form = aqt.forms.changemodel.Ui_Dialog()
|
||||
self.form.setupUi(self)
|
||||
self.setWindowModality(Qt.WindowModal)
|
||||
self.setup()
|
||||
restoreGeom(self, "changeModel")
|
||||
addHook("reset", self.onReset)
|
||||
|
@ -1301,7 +1303,7 @@ Are you sure you want to continue?""")):
|
|||
b.onSearch(reset=False)
|
||||
b.model.endReset()
|
||||
b.mw.progress.finish()
|
||||
b.requireReset()
|
||||
b.mw.requireReset()
|
||||
self.cleanup()
|
||||
return QDialog.accept(self)
|
||||
|
||||
|
|
|
@ -81,6 +81,12 @@
|
|||
</property>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -116,6 +122,12 @@
|
|||
</property>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollArea_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Dialog</class>
|
||||
<widget class="QDialog" name="Dialog">
|
||||
|
@ -5,7 +6,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>248</width>
|
||||
<width>249</width>
|
||||
<height>268</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -13,6 +14,13 @@
|
|||
<string>Generate Cards</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Select cards to generate:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListWidget" name="list">
|
||||
<property name="selectionMode">
|
Loading…
Reference in a new issue