Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(groups): Avoid segfault when resizing group audio window
Browse files Browse the repository at this point in the history
Avatars for group members currently in a call are resized depending on
the area they are displayed in. Previously a scrollbar would appear and
disapear based on the size of the contents. This resulted in
oscillations that ended in a SIGSEGV.

This fix avoids the oscillations by fixing the scrollbar to always be
shown
  • Loading branch information
sphaerophoria authored and anthonybilinski committed Nov 12, 2019
1 parent 08436bc commit d4d4308
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/video/groupnetcamview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ GroupNetCamView::GroupNetCamView(int group, QWidget* parent)

QScrollArea* scrollArea = new QScrollArea();
scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);

// Note this is needed to prevent oscillations that result in segfaults
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
scrollArea->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));

scrollArea->setFrameStyle(QFrame::NoFrame);
QWidget* widget = new QWidget(nullptr);
scrollArea->setWidgetResizable(true);
Expand Down

0 comments on commit d4d4308

Please sign in to comment.