diff --git a/src/frontends/qt4/GuiCharacter.cpp b/src/frontends/qt4/GuiCharacter.cpp index 2d3770e06a..28413250cf 100644 --- a/src/frontends/qt4/GuiCharacter.cpp +++ b/src/frontends/qt4/GuiCharacter.cpp @@ -28,6 +28,7 @@ #include #include +#include #include using namespace std; @@ -378,6 +379,26 @@ void GuiCharacter::dispatchParams() } +void GuiCharacter::saveSession() const +{ + Dialog::saveSession(); + QSettings settings; + settings.setValue(sessionKey() + "/toggleall", toggleallCB->isChecked()); + settings.setValue(sessionKey() + "/autoapply", autoapplyCB->isChecked()); +} + + +void GuiCharacter::restoreSession() +{ + Dialog::restoreSession(); + QSettings settings; + toggleallCB->setChecked( + settings.value(sessionKey() + "/toggleall").toBool()); + autoapplyCB->setChecked( + settings.value(sessionKey() + "/autoapply").toBool()); +} + + Dialog * createGuiCharacter(GuiView & lv) { return new GuiCharacter(lv); } diff --git a/src/frontends/qt4/GuiCharacter.h b/src/frontends/qt4/GuiCharacter.h index 307d00380b..519ead0153 100644 --- a/src/frontends/qt4/GuiCharacter.h +++ b/src/frontends/qt4/GuiCharacter.h @@ -66,6 +66,8 @@ private: void dispatchParams(); bool isBufferDependent() const { return true; } FuncCode getLfun() const { return LFUN_FONT_FREE_UPDATE; } + void saveSession() const; + void restoreSession(); //@} ///