diff --git a/src/simudator/gui/gui.py b/src/simudator/gui/gui.py index 2bb2a03526cb61b55e470eb4b4ed2dccd39461a9..48297b3901f484398cbe607b8ae512c22b96b188 100644 --- a/src/simudator/gui/gui.py +++ b/src/simudator/gui/gui.py @@ -599,23 +599,31 @@ class GUI(QMainWindow): def folderSaveDialog(self) -> str: """ - Opens a file explorer in a new window. Return the absolute path to the selected file. + Open a file explorer in a new window. Return the absolute path to the selected file. + + Can return existing as well as non-existing files. + If the selected files does not exist it will be created. """ dialog = QFileDialog() dialog.setFileMode(QFileDialog.AnyFile) dialog.setAcceptMode(QFileDialog.AcceptOpen) dialog.setDirectory("~/simudator") # TODO: does this work when exported? - # this is static so none of the above matters... + + # getSaveFileName() can returncan return existing file but also create new ones return dialog.getSaveFileName()[0] def folderLoadDialog(self) -> str: """ - Opens a file explorer in a new window. Return the absolute path to the selected file. + Open a file explorer in a new window. Return the absolute path to the selected file. + + Can only return existing files. """ dialog = QFileDialog() dialog.setFileMode(QFileDialog.AnyFile) dialog.setAcceptMode(QFileDialog.AcceptOpen) dialog.setDirectory("~/simudator") # TODO: does this work when exported? + + # getOpenFileName() will only return already existing files return dialog.getOpenFileName()[0] def loadToolBarButtonClick(self) -> None: