Skip to content
Snippets Groups Projects
Commit 75e20861 authored by stefan's avatar stefan
Browse files

PanelBar, Save Restore widgets

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@1865 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 3cc06713
No related branches found
No related tags found
No related merge requests found
...@@ -114,6 +114,7 @@ bool PanelBar::Save(const QString& prefix) ...@@ -114,6 +114,7 @@ bool PanelBar::Save(const QString& prefix)
settings.setArrayIndex(i); settings.setArrayIndex(i);
settings.setValue("class_name", widget_states_.at(i).name); settings.setValue("class_name", widget_states_.at(i).name);
settings.setValue("show", widget_states_.at(i).visible); settings.setValue("show", widget_states_.at(i).visible);
widget_states_.at(i).widget->Save(settings.group());
++index; ++index;
} }
} }
...@@ -169,6 +170,13 @@ bool PanelBar::Restore(const QString& prefix) ...@@ -169,6 +170,13 @@ bool PanelBar::Restore(const QString& prefix)
pwc->Restore(prefix); pwc->Restore(prefix);
} }
} }
for (int i = 0; i < widget_states_.size(); ++i) {
if (widget_states_.at(i).widget) {
QString path = prefix + "/items/" + QString::number(i+1);
widget_states_.at(i).widget->Restore(path);
}
}
settings.endGroup(); settings.endGroup();
return true; return true;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment