mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix save path for new games.
This commit is contained in:
parent
4cfed08247
commit
e6bf318cdf
@ -234,10 +234,14 @@ class QLiberationWindow(QMainWindow):
|
||||
wizard.accepted.connect(lambda: self.onGameGenerated(wizard.generatedGame))
|
||||
|
||||
def openFile(self):
|
||||
if self.game is not None and self.game.savepath:
|
||||
save_dir = self.game.savepath
|
||||
else:
|
||||
save_dir = str(persistency.save_dir())
|
||||
file = QFileDialog.getOpenFileName(
|
||||
self,
|
||||
"Select game file to open",
|
||||
dir=self.game.savepath if self.game else persistency._dcs_saved_game_folder,
|
||||
dir=save_dir,
|
||||
filter="*.liberation",
|
||||
)
|
||||
if file is not None and file[0] != "":
|
||||
@ -257,10 +261,14 @@ class QLiberationWindow(QMainWindow):
|
||||
self.saveGameAs()
|
||||
|
||||
def saveGameAs(self):
|
||||
if self.game is not None and self.game.savepath:
|
||||
save_dir = self.game.savepath
|
||||
else:
|
||||
save_dir = str(persistency.save_dir())
|
||||
file = QFileDialog.getSaveFileName(
|
||||
self,
|
||||
"Save As",
|
||||
dir=self.game.savepath if self.game else persistency._dcs_saved_game_folder,
|
||||
dir=save_dir,
|
||||
filter="*.liberation",
|
||||
)
|
||||
if file is not None:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user