try to fix problems related to errorneous saving of message list header state
This commit is contained in:
parent
b81ac69578
commit
d824d04d12
1 changed files with 5 additions and 1 deletions
|
@ -89,7 +89,10 @@ void MessagesView::restoreHeaderState(const QByteArray& data) {
|
||||||
inn >> ss;
|
inn >> ss;
|
||||||
inn >> ish;
|
inn >> ish;
|
||||||
|
|
||||||
header()->swapSections(header()->visualIndex(i), vi);
|
if (vi < header()->count()) {
|
||||||
|
header()->swapSections(header()->visualIndex(i), vi);
|
||||||
|
}
|
||||||
|
|
||||||
header()->resizeSection(i, ss);
|
header()->resizeSection(i, ss);
|
||||||
header()->setSectionHidden(i, ish);
|
header()->setSectionHidden(i, ish);
|
||||||
}
|
}
|
||||||
|
@ -204,6 +207,7 @@ void MessagesView::setupAppearance() {
|
||||||
setItemDelegate(new StyledItemDelegateWithoutFocus(this));
|
setItemDelegate(new StyledItemDelegateWithoutFocus(this));
|
||||||
header()->setDefaultSectionSize(MESSAGES_VIEW_DEFAULT_COL);
|
header()->setDefaultSectionSize(MESSAGES_VIEW_DEFAULT_COL);
|
||||||
header()->setMinimumSectionSize(MESSAGES_VIEW_MINIMUM_COL);
|
header()->setMinimumSectionSize(MESSAGES_VIEW_MINIMUM_COL);
|
||||||
|
header()->setFirstSectionMovable(true);
|
||||||
header()->setCascadingSectionResizes(false);
|
header()->setCascadingSectionResizes(false);
|
||||||
header()->setStretchLastSection(false);
|
header()->setStretchLastSection(false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue