Skip to content

Commit

Permalink
Save seed
Browse files Browse the repository at this point in the history
Closes #51
  • Loading branch information
Admiral-Fish committed Feb 27, 2020
1 parent d6741c8 commit a1b485d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Forms/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ MainWindow::~MainWindow()
setting.setValue("mainWindow/geometry", this->saveGeometry());
setting.setValue("settings/locale", currentLanguage);
setting.setValue("settings/style", currentStyle);
setting.setValue("settings/seed", ui->textBoxSeed->text());

delete ui;
delete ivCalculator;
Expand Down Expand Up @@ -213,6 +214,10 @@ void MainWindow::setupModels()
connect(ui->comboBoxSpecies, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &MainWindow::speciesIndexChanged);
connect(ui->tableView, &QTableView::customContextMenuRequested, this, &MainWindow::tableViewContextMenu);

if (setting.contains("settings/seed"))
{
ui->textBoxSeed->setText(setting.value("settings/seed").toString());
}
if (setting.contains("mainWindow/geometry"))
{
this->restoreGeometry(setting.value("mainWindow/geometry").toByteArray());
Expand Down

0 comments on commit a1b485d

Please sign in to comment.