diff --git a/src/simudator/gui/gui.py b/src/simudator/gui/gui.py index ef86858eba4e82195189d64884e6ffd8ca920a42..df3b7c381491be0c5baa21c1069f4a7dc3e262ba 100644 --- a/src/simudator/gui/gui.py +++ b/src/simudator/gui/gui.py @@ -599,27 +599,31 @@ class GUI(QMainWindow): def folderSaveDialog(self) -> str: """ - Opens a file explorer in a new window. Returns the absolute path to the selected file. + Open a file explorer in a new window. Return the absolute path to the selected file. - ``dialog.getSaveFileName()`` can return existing aswell as non-existing files. + 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? + + # 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. Returns the absolute path to the selected file. + Open a file explorer in a new window. Return the absolute path to the selected file. - ``dialog.getOpenFileName()`` can only return existing files. + 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: