Only make it dirty if something changes.

This commit is contained in:
Teo Mrnjavac 2016-06-24 17:06:39 +02:00
parent a96b7c1596
commit 9888a4e5d3

View file

@ -187,7 +187,8 @@ PartitionSizeController::doUpdateSpinBox()
return;
qint64 mbSize = m_partition->length() * m_device->logicalSectorSize() / 1024 / 1024;
m_spinBox->setValue( mbSize );
if ( m_currentSpinBoxValue != -1 ) //it's not the first time we're setting it
if ( m_currentSpinBoxValue != -1 && //if it's not the first time we're setting it
m_currentSpinBoxValue != mbSize ) //and the operation changes the SB value
m_dirty = true;
m_currentSpinBoxValue = mbSize;
}