Fixed issue #688. Difficult to enter numbers in Tape.

(grafted from 4c3cac37331437d3a6e9764d38351156c82fd731)

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-05-23 10:45:04 +03:00
parent 118c8c970f
commit 8d10ff5234
3 changed files with 17 additions and 6 deletions

View File

@ -8,6 +8,7 @@
- [#686] Seam allowance not placed correctly.
- [#687] Wrong seam allowance.
- [#689] Grainline default values swapped around.
- [#688] Difficult to enter numbers in Tape.
# Version 0.5.0 May 9, 2017
- [#581] User can now filter input lists by keyword in function wizard.

View File

@ -1435,6 +1435,12 @@ void TMainWindow::ChangedHeight(const QString &text)
//---------------------------------------------------------------------------------------------------------------------
void TMainWindow::ShowMData()
{
ShowNewMData(true);
}
//---------------------------------------------------------------------------------------------------------------------
void TMainWindow::ShowNewMData(bool fresh)
{
if (ui->tableWidget->rowCount() > 0)
{
@ -1487,9 +1493,12 @@ void TMainWindow::ShowMData()
const qreal value = UnitConvertor(data->GetTableValue(meash->GetName(), mType), mUnit, pUnit);
ui->labelCalculatedValue->setText(qApp->LocaleToString(value) + " " +postfix);
ui->doubleSpinBoxBaseValue->setValue(meash->GetBase());
ui->doubleSpinBoxInSizes->setValue(meash->GetKsize());
ui->doubleSpinBoxInHeights->setValue(meash->GetKheight());
if (fresh)
{
ui->doubleSpinBoxBaseValue->setValue(meash->GetBase());
ui->doubleSpinBoxInSizes->setValue(meash->GetKsize());
ui->doubleSpinBoxInHeights->setValue(meash->GetKheight());
}
ui->labelCalculatedValue->blockSignals(false);
ui->doubleSpinBoxBaseValue->blockSignals(false);
@ -1740,7 +1749,7 @@ void TMainWindow::SaveMBaseValue(double value)
ui->tableWidget->selectRow(row);
ui->tableWidget->blockSignals(false);
ShowMData();
ShowNewMData(false);
}
//---------------------------------------------------------------------------------------------------------------------
@ -1765,7 +1774,7 @@ void TMainWindow::SaveMSizeIncrease(double value)
ui->tableWidget->selectRow(row);
ui->tableWidget->blockSignals(false);
ShowMData();
ShowNewMData(false);
}
//---------------------------------------------------------------------------------------------------------------------
@ -1790,7 +1799,7 @@ void TMainWindow::SaveMHeightIncrease(double value)
ui->tableWidget->selectRow(row);
ui->tableWidget->blockSignals(false);
ShowMData();
ShowNewMData(false);
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -162,6 +162,7 @@ private:
void InitComboBoxUnits();
void InitGender(QComboBox *gender);
void ShowNewMData(bool fresh);
void ShowUnits();
void ShowHeaderUnits(QTableWidget *table, int column, const QString &unit);
void UpdateRecentFileActions();