Keep track of previous spinbox value.
This commit is contained in:
parent
cd94768850
commit
1f664f1eec
@ -130,6 +130,9 @@ PartitionSizeController::updatePartResizerWidget()
|
||||
{
|
||||
if ( m_updating )
|
||||
return;
|
||||
if ( m_spinBox->value() == m_currentSpinBoxValue )
|
||||
return;
|
||||
|
||||
m_updating = true;
|
||||
qint64 sectorSize = qint64( m_spinBox->value() ) * 1024 * 1024 / m_device->logicalSectorSize();
|
||||
|
||||
@ -183,6 +186,9 @@ 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
|
||||
m_dirty = true;
|
||||
m_currentSpinBoxValue = mbSize;
|
||||
}
|
||||
|
||||
qint64
|
||||
|
@ -71,6 +71,7 @@ private:
|
||||
void doAlignAndUpdatePartResizerWidget( qint64 fistSector, qint64 lastSector );
|
||||
|
||||
bool m_dirty = false;
|
||||
qint64 m_currentSpinBoxValue = -1;
|
||||
|
||||
private Q_SLOTS:
|
||||
void updatePartResizerWidget();
|
||||
|
Loading…
Reference in New Issue
Block a user