mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-27 00:53:55 -07:00
Remember last opened directory when loading decks (#5418)
* remember last directory when loading deck * move shared code into new dlg class
This commit is contained in:
parent
9c38c9ed1b
commit
93fab3d78f
7 changed files with 61 additions and 6 deletions
|
|
@ -29,4 +29,14 @@ void RecentsSettings::updateRecentlyOpenedDeckPaths(const QString &deckPath)
|
|||
|
||||
setValue(deckPaths, "deckpaths", "deckbuilder");
|
||||
emit recentlyOpenedDeckPathsChanged();
|
||||
}
|
||||
|
||||
QString RecentsSettings::getLatestDeckDirPath()
|
||||
{
|
||||
return getValue("latestDeckDir", "dirs").toString();
|
||||
}
|
||||
|
||||
void RecentsSettings::setLatestDeckDirPath(const QString &dirPath)
|
||||
{
|
||||
setValue(dirPath, "latestDeckDir", "dirs");
|
||||
}
|
||||
|
|
@ -16,6 +16,9 @@ public:
|
|||
void clearRecentlyOpenedDeckPaths();
|
||||
void updateRecentlyOpenedDeckPaths(const QString &deckPath);
|
||||
|
||||
QString getLatestDeckDirPath();
|
||||
void setLatestDeckDirPath(const QString &dirPath);
|
||||
|
||||
signals:
|
||||
void recentlyOpenedDeckPathsChanged();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue