Use length instead of calculating sectors count.

This commit is contained in:
Teo Mrnjavac 2016-06-24 15:10:20 +02:00
parent 4f41cf54a9
commit 9d995f3625

View File

@ -151,7 +151,7 @@ PartitionSizeController::doUpdateSpinBox()
{
if ( !m_spinBox )
return;
qint64 mbSize = ( m_partition->lastSector() - m_partition->firstSector() + 1 ) * m_device->logicalSectorSize() / 1024 / 1024;
qint64 mbSize = m_partition->length() * m_device->logicalSectorSize() / 1024 / 1024;
m_spinBox->setValue( mbSize );
}