diff --git a/src/fgt/edit_quality/qualitymapperdialog.cpp b/src/fgt/edit_quality/qualitymapperdialog.cpp index ce90da942..68f5f2546 100644 --- a/src/fgt/edit_quality/qualitymapperdialog.cpp +++ b/src/fgt/edit_quality/qualitymapperdialog.cpp @@ -1271,14 +1271,11 @@ void QualityMapperDialog::updateXQualityLabel(float xPos) _currentTfHandleQualityValue.setNum(relative2QualityValf(xPos, ui.minSpinBox->value(), ui.maxSpinBox->value(), exp)); if (_currentTfHandleQualityValue.size() < QUALITY_LABEL_DIGITS_NUM) { - int pos = 0; QChar paddedZeros[] = {'0','0','0','0','0','0'}; - if((pos = _currentTfHandleQualityValue.indexOf('.')) == -1) - { + if(_currentTfHandleQualityValue.indexOf('.') == -1) _currentTfHandleQualityValue.append('.'); - pos = _currentTfHandleQualityValue.size() - 1; - } - _currentTfHandleQualityValue.insert(pos, paddedZeros, QUALITY_LABEL_DIGITS_NUM-_currentTfHandleQualityValue.size()); + if ((QUALITY_LABEL_DIGITS_NUM - _currentTfHandleQualityValue.size()) > 0) + _currentTfHandleQualityValue.insert(_currentTfHandleQualityValue.size(), paddedZeros, QUALITY_LABEL_DIGITS_NUM-_currentTfHandleQualityValue.size()); } ui.xQualityLabel->setText(_currentTfHandleQualityValue); } diff --git a/src/fgt/edit_quality/qualitymapperdialog.h b/src/fgt/edit_quality/qualitymapperdialog.h index 92241e60f..a0d154cba 100644 --- a/src/fgt/edit_quality/qualitymapperdialog.h +++ b/src/fgt/edit_quality/qualitymapperdialog.h @@ -27,8 +27,8 @@ FIRST RELEASE ****************************************************************************/ -#ifndef QUALITYMAPPERDIALOG_H -#define QUALITYMAPPERDIALOG_H +#ifndef _QUALITYMAPPER_DIALOG_H_ +#define _QUALITYMAPPER_DIALOG_H_ #include #include