Use length instead of calculating sectors count.
This commit is contained in:
parent
4f41cf54a9
commit
9d995f3625
@ -151,7 +151,7 @@ PartitionSizeController::doUpdateSpinBox()
|
|||||||
{
|
{
|
||||||
if ( !m_spinBox )
|
if ( !m_spinBox )
|
||||||
return;
|
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 );
|
m_spinBox->setValue( mbSize );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user