Commit 594dc25e authored by Oliver Bock's avatar Oliver Bock

Persist view settings for orbital planes, rotation axes and pulse flashes

parent 779cc254
......@@ -135,6 +135,11 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent)
restoreGeometry(settings.value("windowGeometry").toByteArray());
restoreState(settings.value("windowState").toByteArray());
ui.splitter->restoreState(settings.value("splitterSizes").toByteArray());
// restore view features
ui.actionPermanent_orbits->setChecked(settings.value("viewOrbitalPlanes", m_permanentOrbits).toBool());
ui.actionRotationAxes->setChecked(settings.value("viewRotationAxes", m_rotationAxesVisible).toBool());
ui.actionPulseFlashes->setChecked(settings.value("viewPulseFlashes", m_pulseFlashesVisible).toBool());
}
PulsatingScience::~PulsatingScience()
......@@ -206,6 +211,11 @@ void PulsatingScience::closeEvent(QCloseEvent *event)
settings.setValue("windowState", saveState());
settings.setValue("splitterSizes", ui.splitter->saveState());
// save view features
settings.setValue("viewOrbitalPlanes", m_permanentOrbits);
settings.setValue("viewRotationAxes", m_rotationAxesVisible);
settings.setValue("viewPulseFlashes", m_pulseFlashesVisible);
event->accept();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment