mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-28 16:20:26 +01:00
StretchHeaderView: Properly implement reset
This commit is contained in:
parent
d303e700ae
commit
da3876bd83
@ -171,11 +171,19 @@ bool StretchHeaderView::RestoreState(const QByteArray &state) {
|
|||||||
|
|
||||||
QByteArray StretchHeaderView::ResetState() {
|
QByteArray StretchHeaderView::ResetState() {
|
||||||
|
|
||||||
stretch_enabled_ = true;
|
stretch_enabled_ = false;
|
||||||
|
column_widths_.resize(count());
|
||||||
|
std::fill(column_widths_.begin(), column_widths_.end(), 1.0 / count());
|
||||||
|
|
||||||
setSortIndicator(0, Qt::AscendingOrder);
|
setSortIndicator(-1, Qt::AscendingOrder);
|
||||||
|
|
||||||
return QByteArray();
|
for (int i = 0; i < count(); ++i) {
|
||||||
|
setSectionHidden(i, false);
|
||||||
|
resizeSection(i, defaultSectionSize());
|
||||||
|
moveSection(visualIndex(i), i);
|
||||||
|
}
|
||||||
|
|
||||||
|
return SaveState();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user