Do set flags after showing dialog.

This commit is contained in:
Teo Mrnjavac 2016-03-08 12:44:49 +01:00
parent 5a134eb708
commit 3fa7318a37

View File

@ -167,7 +167,12 @@ PartitionPage::onCreateClicked()
QPointer<CreatePartitionDialog> dlg = new CreatePartitionDialog( model->device(), partition->parent(), this );
dlg->initFromFreeSpace( partition );
if ( dlg->exec() == QDialog::Accepted )
m_core->createPartition( model->device(), dlg->createPartition() );
{
Partition* newPart = dlg->createPartition();
m_core->createPartition( model->device(), newPart );
if ( dlg->newFlags() != PartitionTable::FlagNone )
m_core->setPartitionFlags( model->device(), newPart, dlg->newFlags() );
}
delete dlg;
}