mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
Enable Tag Modified iff importMode is Update
This commit is contained in:
parent
e481cce816
commit
46a24812ce
2 changed files with 10 additions and 1 deletions
|
@ -18,7 +18,7 @@ support site, it would be great if you could add your name below as well.
|
||||||
|
|
||||||
********************
|
********************
|
||||||
|
|
||||||
- Sample Name
|
Erez Volk <erez.volk@gmail.com>
|
||||||
|
|
||||||
********************
|
********************
|
||||||
|
|
||||||
|
|
|
@ -91,6 +91,7 @@ class ImportDialog(QDialog):
|
||||||
self.frm.autoDetect.clicked.connect(self.onDelimiter)
|
self.frm.autoDetect.clicked.connect(self.onDelimiter)
|
||||||
self.updateDelimiterButtonText()
|
self.updateDelimiterButtonText()
|
||||||
self.frm.allowHTML.setChecked(self.mw.pm.profile.get("allowHTML", True))
|
self.frm.allowHTML.setChecked(self.mw.pm.profile.get("allowHTML", True))
|
||||||
|
self.frm.importMode.currentIndexChanged.connect(self.importModeChanged)
|
||||||
self.frm.importMode.setCurrentIndex(self.mw.pm.profile.get("importMode", 1))
|
self.frm.importMode.setCurrentIndex(self.mw.pm.profile.get("importMode", 1))
|
||||||
# import button
|
# import button
|
||||||
b = QPushButton(_("Import"))
|
b = QPushButton(_("Import"))
|
||||||
|
@ -286,6 +287,14 @@ you can enter it here. Use \\t to represent tab."""
|
||||||
def helpRequested(self):
|
def helpRequested(self):
|
||||||
openHelp("importing")
|
openHelp("importing")
|
||||||
|
|
||||||
|
def importModeChanged(self, newImportMode):
|
||||||
|
if newImportMode == 0:
|
||||||
|
allowTagModified = True
|
||||||
|
else:
|
||||||
|
allowTagModified = False
|
||||||
|
self.frm.tagModifiedCheck.setEnabled(allowTagModified)
|
||||||
|
self.frm.tagModifiedTag.setEnabled(allowTagModified)
|
||||||
|
|
||||||
|
|
||||||
def showUnicodeWarning():
|
def showUnicodeWarning():
|
||||||
"""Shorthand to show a standard warning."""
|
"""Shorthand to show a standard warning."""
|
||||||
|
|
Loading…
Reference in a new issue