From 5a849d802b9fb44d75a1dbc776a5c47d95478846 Mon Sep 17 00:00:00 2001 From: Caio Carvalho Date: Mon, 28 May 2018 16:24:31 -0300 Subject: [PATCH] Checking if a new partition is targeted by a new VG through LvmDevice::s_DirtyPVs list instead of searching for a CreateVolumeGroupOperation targeting this new partition. --- src/gui/createvolumegroupdialog.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/gui/createvolumegroupdialog.cpp b/src/gui/createvolumegroupdialog.cpp index b601d07..ca635be 100644 --- a/src/gui/createvolumegroupdialog.cpp +++ b/src/gui/createvolumegroupdialog.cpp @@ -78,17 +78,8 @@ void CreateVolumeGroupDialog::setupDialog() for (const Device *d : qAsConst(m_Devices)) { for (const Partition *p : qAsConst(d->partitionTable()->children())) { - bool alreadyInPendingVG = false; - // Looking if there is another VG creation that contains this partition - for (const auto &o : qAsConst(m_PendingOps)) { - if (dynamic_cast(o) && o->targets(*p)) { - alreadyInPendingVG = true; - break; - } - } - - if (alreadyInPendingVG) + if (LvmDevice::s_DirtyPVs.contains(p)) continue; // Including new LVM PVs (that are currently in OperationStack and that aren't at other VG creation)