From 603ff292410747c36204149117dbf5022c73032a Mon Sep 17 00:00:00 2001 From: f4exb Date: Mon, 24 Aug 2020 19:42:25 +0200 Subject: [PATCH] RollupWidget: fixed collapse section header not showing up. Fixes #608 --- sdrgui/gui/rollupwidget.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/sdrgui/gui/rollupwidget.cpp b/sdrgui/gui/rollupwidget.cpp index 0644e4477..20d109e20 100644 --- a/sdrgui/gui/rollupwidget.cpp +++ b/sdrgui/gui/rollupwidget.cpp @@ -124,20 +124,24 @@ int RollupWidget::arrangeRollups() { QWidget* r = qobject_cast(children()[i]); - if ((r != nullptr) && !r->isHidden() && isRollupChild(r)) + if ((r != nullptr) && isRollupChild(r)) { pos += fm.height() + 2; - r->move(2, pos + 3); - int h = 0; - if (r->hasHeightForWidth()) { - h = r->heightForWidth(width() - 4); - } else { - h = r->sizeHint().height(); + if (!r->isHidden()) + { + r->move(2, pos + 3); + int h = 0; + + if (r->hasHeightForWidth()) { + h = r->heightForWidth(width() - 4); + } else { + h = r->sizeHint().height(); + } + + r->resize(width() - 4, h); + pos += r->height() + 5; } - - r->resize(width() - 4, h); - pos += r->height() + 5; } }