Skip to content

Commit b0ac763

Browse files
committed
Show scroll bar in Torrent Tags dialog
PR qbittorrent#21026. Closes qbittorrent#21022.
1 parent 127d2d6 commit b0ac763

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/gui/torrenttagsdialog.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ TorrentTagsDialog::TorrentTagsDialog(const TagSet &initialTags, QWidget *parent)
5353
connect(m_ui->buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
5454
connect(m_ui->buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
5555

56-
auto *tagsLayout = new FlowLayout(m_ui->scrollArea);
56+
auto *tagsLayout = new FlowLayout(m_ui->scrollArea->widget());
5757
for (const Tag &tag : asConst(initialTags.united(BitTorrent::Session::instance()->tags())))
5858
{
5959
auto *tagWidget = new QCheckBox(Utils::Gui::tagToWidgetText(tag));
@@ -79,7 +79,7 @@ TorrentTagsDialog::~TorrentTagsDialog()
7979
TagSet TorrentTagsDialog::tags() const
8080
{
8181
TagSet tags;
82-
auto *layout = m_ui->scrollArea->layout();
82+
auto *layout = m_ui->scrollArea->widget()->layout();
8383
for (int i = 0; i < (layout->count() - 1); ++i)
8484
{
8585
const auto *tagWidget = static_cast<QCheckBox *>(layout->itemAt(i)->widget());
@@ -112,7 +112,7 @@ void TorrentTagsDialog::addNewTag()
112112
}
113113
else
114114
{
115-
auto *layout = m_ui->scrollArea->layout();
115+
auto *layout = m_ui->scrollArea->widget()->layout();
116116
auto *btn = layout->takeAt(layout->count() - 1);
117117
auto *tagWidget = new QCheckBox(Utils::Gui::tagToWidgetText(tag));
118118
tagWidget->setChecked(true);

0 commit comments

Comments
 (0)