git-svn-id: svn://db.shs.com.ru/libs@408 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2018-06-19 14:10:04 +00:00
parent c10a004a4e
commit da880f5f0f
2 changed files with 8 additions and 0 deletions

View File

@@ -32,6 +32,8 @@ void SessionManager::save() {
sr.setValue(tabs[i].first, tabs[i].second->currentIndex(), false);
for (int i = 0; i < buttons.size(); ++i)
sr.setValue(buttons[i].first, buttons[i].second->isChecked(), false);
for (int i = 0; i < stacks.size(); ++i)
sr.setValue(stacks[i].first, stacks[i].second->currentIndex(), false);
for (int i = 0; i < actions.size(); ++i)
sr.setValue(actions[i].first, actions[i].second->isChecked(), false);
for (int i = 0; i < stringlists.size(); ++i)
@@ -91,6 +93,8 @@ void SessionManager::load(bool onlyMainwindow) {
}
for (int i = 0; i < buttons.size(); ++i)
buttons[i].second->setChecked(sr.getValue(buttons[i].first, buttons[i].second->isChecked()));
for (int i = 0; i < stacks.size(); ++i)
stacks[i].second->setCurrentIndex(qMin((int)sr.getValue(stacks[i].first, stacks[i].second->currentIndex()), stacks[i].second->count()));
for (int i = 0; i < actions.size(); ++i)
actions[i].second->setChecked(sr.getValue(actions[i].first, actions[i].second->isChecked()));
for (int i = 0; i < stringlists.size(); ++i)