diff --git a/src/playlist/playlistview.cpp b/src/playlist/playlistview.cpp index ba864b0cf..b43e2a904 100644 --- a/src/playlist/playlistview.cpp +++ b/src/playlist/playlistview.cpp @@ -225,6 +225,18 @@ void PlaylistView::LoadGeometry() { if (state_version < 3) { header_->HideSection(Playlist::Column_Comment); } + + // Make sure at least one column is visible + bool all_hidden = true; + for (int i=0 ; icount() ; ++i) { + if (!header_->isSectionHidden(i) && header_->sectionSize(i) > 0) { + all_hidden = false; + break; + } + } + if (all_hidden) { + header_->ShowSection(Playlist::Column_Title); + } } void PlaylistView::SaveGeometry() { diff --git a/src/widgets/stretchheaderview.cpp b/src/widgets/stretchheaderview.cpp index a126ddcb0..3dd7ba571 100644 --- a/src/widgets/stretchheaderview.cpp +++ b/src/widgets/stretchheaderview.cpp @@ -95,6 +95,18 @@ void StretchHeaderView::UpdateWidths(const QList& sections) { } void StretchHeaderView::HideSection(int logical) { + // Would this hide the last section? + bool all_hidden = true; + for (int i=0 ; i 0) { + all_hidden = false; + break; + } + } + if (all_hidden) { + return; + } + if (!stretch_enabled_) { hideSection(logical); return;