Enable Tag Modified iff importMode is Update

This commit is contained in:
Erez Volk 2020-01-03 08:32:44 +02:00
parent e481cce816
commit 46a24812ce
2 changed files with 10 additions and 1 deletions

View file

@ -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>
********************

View file

@ -91,6 +91,7 @@ class ImportDialog(QDialog):
self.frm.autoDetect.clicked.connect(self.onDelimiter)
self.updateDelimiterButtonText()
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))
# import button
b = QPushButton(_("Import"))
@ -286,6 +287,14 @@ you can enter it here. Use \\t to represent tab."""
def helpRequested(self):
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():
"""Shorthand to show a standard warning."""