From b9e5a055d41fb69d8665348a620869d111364c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Tue, 28 Dec 2021 16:27:20 +0000 Subject: [PATCH] Check if we need to show permissions groupBox when New Partition dialog is first shown. --- src/gui/newdialog.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/newdialog.cpp b/src/gui/newdialog.cpp index 9cad0bb..b130e89 100644 --- a/src/gui/newdialog.cpp +++ b/src/gui/newdialog.cpp @@ -114,7 +114,7 @@ void NewDialog::setupDialog() onRoleChanged(false); onFilesystemChanged(dialogWidget().comboFileSystem().currentIndex()); - connect(&dialogWidget().comboFileSystem(), QOverload::of(&QComboBox::currentIndexChanged), this, [this]{ + auto showPermissionsGroup = [this] { const QString currText = dialogWidget().comboFileSystem().currentText(); const bool enablePosixPermission = QList({ QStringLiteral("btrfs"), @@ -137,7 +137,9 @@ void NewDialog::setupDialog() } else { dialogWidget().hidePosixPermissions(); } - }); + }; + connect(&dialogWidget().comboFileSystem(), QOverload::of(&QComboBox::currentIndexChanged), this, showPermissionsGroup); + showPermissionsGroup(); } void NewDialog::setupConnections()