diff --git a/Core/Interface/MenuBar.py b/Core/Interface/MenuBar.py index 8160cf3..562f317 100644 --- a/Core/Interface/MenuBar.py +++ b/Core/Interface/MenuBar.py @@ -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): diff --git a/LinkScope.py b/LinkScope.py index d27bfa0..3d1d884 100644 --- a/LinkScope.py +++ b/LinkScope.py @@ -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 != '':