Commit 32981fff authored by Laurent Montel's avatar Laurent Montel 😁

improve restore pane

parent 261f99c6
......@@ -1054,7 +1054,7 @@ void Pane::writeConfig(bool restoreSession)
void Pane::readConfig(bool restoreSession)
{
if(restoreSession && MessageList::Core::Settings::self()->config()->hasGroup(QLatin1String("MessageListPane"))) {
if(MessageList::Core::Settings::self()->config()->hasGroup(QLatin1String("MessageListPane"))) {
KConfigGroup conf( MessageList::Core::Settings::self()->config(),"MessageListPane");
const int numberOfTab = conf.readEntry(QLatin1String("tabNumber"),0);
if(numberOfTab == 0) {
......@@ -1063,7 +1063,8 @@ void Pane::readConfig(bool restoreSession)
for(int i = 0; i<numberOfTab; ++i) {
createNewTab();
restoreHeaderSettings(i);
#if 0
if (restoreSession) {
#if 0 //TODO fix me
Akonadi::Collection::Id id = grp.readEntry(QLatin1String("collectionId"),-1);
ETMViewStateSaver *saver = new ETMViewStateSaver;
saver->setSelectionModel(selectionModel);
......@@ -1077,6 +1078,7 @@ void Pane::readConfig(bool restoreSession)
}
#endif
}
}
setCurrentIndex(conf.readEntry(QLatin1String("currentIndex"),0));
}
} else {
......
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