Remove fallback parameter for lastPath and remove commented out code
This commit is contained in:
@@ -438,9 +438,9 @@ class Config:
|
|||||||
return self._appPath / "assets" / target
|
return self._appPath / "assets" / target
|
||||||
return self._appPath / "assets"
|
return self._appPath / "assets"
|
||||||
|
|
||||||
def lastPath(self, key: str | None = None) -> Path:
|
def lastPath(self, key: str) -> Path:
|
||||||
"""Return the last path used by the user, if it exists."""
|
"""Return the last path used by the user, if it exists."""
|
||||||
if path := self._recentPaths.getPath(key or "default"):
|
if path := self._recentPaths.getPath(key):
|
||||||
asPath = Path(path)
|
asPath = Path(path)
|
||||||
if asPath.is_dir():
|
if asPath.is_dir():
|
||||||
return asPath
|
return asPath
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ class GuiWelcome(NDialog):
|
|||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def _browseForProject(self) -> None:
|
def _browseForProject(self) -> None:
|
||||||
"""Browse for a project to open."""
|
"""Browse for a project to open."""
|
||||||
if path := SHARED.getProjectPath(self, path=CONFIG.lastPath("project"), allowZip=False):
|
if path := SHARED.getProjectPath(self, path=CONFIG.homePath(), allowZip=False):
|
||||||
self._openProjectPath(path)
|
self._openProjectPath(path)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ def resetConfigVars():
|
|||||||
"""Reset the CONFIG object and set various values for testing to
|
"""Reset the CONFIG object and set various values for testing to
|
||||||
prevent interfering with local OS.
|
prevent interfering with local OS.
|
||||||
"""
|
"""
|
||||||
# CONFIG.setLastPath(_TMP_ROOT)
|
|
||||||
CONFIG.setBackupPath(_TMP_ROOT)
|
CONFIG.setBackupPath(_TMP_ROOT)
|
||||||
CONFIG.setGuiFont(None)
|
CONFIG.setGuiFont(None)
|
||||||
CONFIG.setTextFont(None)
|
CONFIG.setTextFont(None)
|
||||||
|
|||||||
Reference in New Issue
Block a user