Fix if order

First we need to set the partition permission flags, then we
create the operation.
This commit is contained in:
Tomaz Canabrava 2021-12-09 16:56:52 +01:00 committed by Andrius Štikonas
parent bfc445bd7c
commit 2bcd994bf1
1 changed files with 2 additions and 2 deletions

View File

@ -505,10 +505,10 @@ void PartitionManagerWidget::onNewPartition()
QPointer<NewDialog> dlg = new NewDialog(this, *selectedDevice(), *newPartition, selectedDevice()->partitionTable()->childRoles(*selectedPartition()));
if (dlg->exec() == QDialog::Accepted) {
operationStack().push(new NewOperation(*selectedDevice(), newPartition));
if (dlg->useUnsecuredPartition()) {
// operationStac().push(new ChangePermissionOperation("777", *selectedDevice(), newPartition);
newPartition->setPermissions(QStringLiteral("777"));
}
operationStack().push(new NewOperation(*selectedDevice(), newPartition));
} else {
delete newPartition;
}