diff --git a/src/modules/partition/gui/PartitionSizeController.cpp b/src/modules/partition/gui/PartitionSizeController.cpp index fadd6a13e..18d0470c5 100644 --- a/src/modules/partition/gui/PartitionSizeController.cpp +++ b/src/modules/partition/gui/PartitionSizeController.cpp @@ -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 diff --git a/src/modules/partition/gui/PartitionSizeController.h b/src/modules/partition/gui/PartitionSizeController.h index 1894696b2..64430b112 100644 --- a/src/modules/partition/gui/PartitionSizeController.h +++ b/src/modules/partition/gui/PartitionSizeController.h @@ -71,6 +71,7 @@ private: void doAlignAndUpdatePartResizerWidget( qint64 fistSector, qint64 lastSector ); bool m_dirty = false; + qint64 m_currentSpinBoxValue = -1; private Q_SLOTS: void updatePartResizerWidget();