From 7d5d1f8f8a1d88bb033fbf147baf20d8c851b729 Mon Sep 17 00:00:00 2001 From: Caio Carvalho Date: Mon, 7 May 2018 20:21:14 -0300 Subject: [PATCH] Listing newly created encrypted LVM PVs in Create Volume Group dialog. --- src/gui/createvolumegroupdialog.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/gui/createvolumegroupdialog.cpp b/src/gui/createvolumegroupdialog.cpp index e4c136b..1021676 100644 --- a/src/gui/createvolumegroupdialog.cpp +++ b/src/gui/createvolumegroupdialog.cpp @@ -92,8 +92,16 @@ void CreateVolumeGroupDialog::setupDialog() continue; // Including new LVM PVs (that are currently in OperationStack and that aren't at other VG creation) - if (p->state() == Partition::State::New && p->fileSystem().type() == FileSystem::Type::Lvm2_PV) - dialogWidget().listPV().addPartition(*p, false); + if (p->state() == Partition::State::New) { + if (p->fileSystem().type() == FileSystem::Type::Lvm2_PV) + dialogWidget().listPV().addPartition(*p, false); + else if (p->fileSystem().type() == FileSystem::Type::Luks || p->fileSystem().type() == FileSystem::Type::Luks2) { + FileSystem *fs = static_cast(&p->fileSystem())->innerFS(); + + if (fs->type() == FileSystem::Type::Lvm2_PV) + dialogWidget().listPV().addPartition(*p, false); + } + } } } }