--Bug fixes

-Allow 7 decimal places in variations spinners.
 -Try to prevent infinite loop that sometimes happens when drawing grid. Unsure if this actually works since it's very hard to reproduce.
This commit is contained in:
Person
2018-01-28 17:51:19 -08:00
parent fba7f60fda
commit 4c53364f62
5 changed files with 16 additions and 7 deletions

View File

@ -356,7 +356,7 @@ VariationTreeDoubleSpinBox::VariationTreeDoubleSpinBox(QWidget* p, VariationTree
m_WidgetItem = widgetItem;
m_Param = param;
m_Id = id;
//setDecimals(3);
setDecimals(7);
//PI
auto piAction = new QAction("PI", this);
connect(piAction, SIGNAL(triggered(bool)), this, SLOT(PiActionTriggered(bool)), Qt::QueuedConnection);
@ -426,7 +426,13 @@ void VariationTreeDoubleSpinBox::SqrtThreeActionTriggered(bool checked) { setVal
QString VariationTreeDoubleSpinBox::textFromValue(double value) const
{
return QWidget::locale().toString(value, 'g', 10);
return QWidget::locale().toString(value, 'g', decimals());
}
double VariationTreeDoubleSpinBox::valueFromText(const QString& text) const
{
return QWidget::locale().toDouble(text);
}
/// <summary>