Small bug fixes - making some popups visible & ensuring that all file selection prompts start at the home directory.
This commit is contained in:
@@ -1658,11 +1658,17 @@ class ImportLinkEntitiesFromCSVFile(QtWidgets.QDialog):
|
||||
def confirmThatPrimaryFieldIsMapped(self):
|
||||
primaryField = self.parent().parent().RESOURCEHANDLER.getPrimaryFieldForEntityType(
|
||||
self.entityTypeChoiceDropdown.currentText())
|
||||
primaryFieldMapped = False
|
||||
for comboBox in self.fieldMappingComboBoxes:
|
||||
if comboBox.currentText() == primaryField:
|
||||
self.accept()
|
||||
self.parent().parent().MESSAGEHANDLER.warning('Primary field (' + primaryField +
|
||||
') needs to be mapped before proceeding.')
|
||||
# Just doing self.accept() here will not work.
|
||||
primaryFieldMapped = True
|
||||
break
|
||||
if primaryFieldMapped:
|
||||
self.accept()
|
||||
else:
|
||||
self.parent().parent().MESSAGEHANDLER.warning('Primary field (' + primaryField +
|
||||
') needs to be mapped before proceeding.', popUp=True)
|
||||
|
||||
|
||||
class ImportEntityFromCSVFile(QtWidgets.QDialog):
|
||||
@@ -1781,7 +1787,7 @@ class ImportEntityFromCSVFile(QtWidgets.QDialog):
|
||||
self.accept()
|
||||
else:
|
||||
self.parent().parent().MESSAGEHANDLER.warning('Primary field (' + primaryField +
|
||||
') needs to be mapped before proceeding.')
|
||||
') needs to be mapped before proceeding.', popUp=True)
|
||||
|
||||
|
||||
class ImportFromFileDialog(QtWidgets.QDialog):
|
||||
|
||||
@@ -118,6 +118,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||
saveAsDialog.setFileMode(QtWidgets.QFileDialog.AnyFile)
|
||||
saveAsDialog.setAcceptMode(QtWidgets.QFileDialog.AcceptSave)
|
||||
saveAsDialog.setStyleSheet(Stylesheets.MAIN_WINDOW_STYLESHEET)
|
||||
saveAsDialog.setDirectory(str(Path.home()))
|
||||
|
||||
saveAsExec = saveAsDialog.exec()
|
||||
if not saveAsExec:
|
||||
@@ -1868,6 +1869,7 @@ class EntityPage(QtWidgets.QWizardPage):
|
||||
|
||||
def editPath(self):
|
||||
selectedPath = QtWidgets.QFileDialog().getOpenFileName(parent=self, caption='Select New Icon',
|
||||
dir=str(Path.home()),
|
||||
options=QtWidgets.QFileDialog.DontUseNativeDialog,
|
||||
filter="Image Files (*.png *.jpg)")[0]
|
||||
if selectedPath != '':
|
||||
@@ -1875,6 +1877,7 @@ class EntityPage(QtWidgets.QWizardPage):
|
||||
|
||||
def editAppendixPath(self):
|
||||
selectedPath = QtWidgets.QFileDialog().getOpenFileName(parent=self, caption='Select New Icon',
|
||||
dir=str(Path.home()),
|
||||
options=QtWidgets.QFileDialog.DontUseNativeDialog,
|
||||
filter="Image Files (*.png *.jpg)")[0]
|
||||
if selectedPath != '':
|
||||
|
||||
Reference in New Issue
Block a user