mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
22 lines
No EOL
659 B
C++
22 lines
No EOL
659 B
C++
#include "dlg_load_deck.h"
|
|
|
|
#include "../deck/deck_loader.h"
|
|
#include "../settings/cache_settings.h"
|
|
|
|
DlgLoadDeck::DlgLoadDeck(QWidget *parent) : QFileDialog(parent, tr("Load Deck"))
|
|
{
|
|
QString startingDir = SettingsCache::instance().recents().getLatestDeckDirPath();
|
|
if (startingDir.isEmpty()) {
|
|
startingDir = SettingsCache::instance().getDeckPath();
|
|
}
|
|
|
|
setDirectory(startingDir);
|
|
setNameFilters(DeckLoader::fileNameFilters);
|
|
|
|
connect(this, &DlgLoadDeck::accepted, this, &DlgLoadDeck::actAccepted);
|
|
}
|
|
|
|
void DlgLoadDeck::actAccepted()
|
|
{
|
|
SettingsCache::instance().recents().setLatestDeckDirPath(directory().absolutePath());
|
|
} |