Append all the remaining space for LVM resize dialog.

This commit is contained in:
Chantara Tith 2016-06-29 15:38:31 +07:00 committed by Andrius Štikonas
parent 1673a9ddeb
commit 975e005ed2
1 changed files with 7 additions and 2 deletions

View File

@ -602,8 +602,13 @@ void PartitionManagerWidget::onResizePartition()
// clear the selection, so we'll lose the partition after the dialog's been exec'd
Partition& p = *selectedPartition();
const qint64 freeBefore = selectedDevice()->partitionTable()->freeSectorsBefore(p);
const qint64 freeAfter = selectedDevice()->partitionTable()->freeSectorsAfter(p);
qint64 freeBefore = selectedDevice()->partitionTable()->freeSectorsBefore(p);
qint64 freeAfter = selectedDevice()->partitionTable()->freeSectorsAfter(p);
if (selectedDevice()->type() == Device::LVM_Device) {
freeBefore = 0;
freeAfter = selectedDevice()->partitionTable()->freeSectors();
}
QPointer<ResizeDialog> dlg = new ResizeDialog(this, *selectedDevice(), p, p.firstSector() - freeBefore, freeAfter + p.lastSector());