Fix build with MSVC.

This commit is contained in:
Roman Telezhynskyi 2021-09-15 10:42:38 +03:00
parent c7dbbb8146
commit 2433517203
2 changed files with 5 additions and 3 deletions

View File

@ -31,6 +31,7 @@
#include <memory> #include <memory>
#include <QCoreApplication> #include <QCoreApplication>
#include <QCommandLineParser> #include <QCommandLineParser>
#include <ciso646>
class VPCommandLine; class VPCommandLine;
using VPCommandLinePtr = std::shared_ptr<VPCommandLine>; using VPCommandLinePtr = std::shared_ptr<VPCommandLine>;

View File

@ -768,8 +768,8 @@ void VPMainWindow::InitPropertyTabCurrentPiece()
ui->comboBoxTranslateUnit->setCurrentIndex(0); ui->comboBoxTranslateUnit->setCurrentIndex(0);
ui->comboBoxTranslateUnit->blockSignals(false); ui->comboBoxTranslateUnit->blockSignals(false);
const int minTranslate = -1000; int minTranslate = -1000;
const int maxTranslate = 1000; int maxTranslate = 1000;
ui->doubleSpinBoxCurrentPieceBoxPositionX->setMinimum( ui->doubleSpinBoxCurrentPieceBoxPositionX->setMinimum(
UnitConvertor(minTranslate, Unit::Cm, m_oldPieceTranslationUnit)); UnitConvertor(minTranslate, Unit::Cm, m_oldPieceTranslationUnit));
@ -783,7 +783,8 @@ void VPMainWindow::InitPropertyTabCurrentPiece()
UnitConvertor(maxTranslate, Unit::Cm, m_oldPieceTranslationUnit)); UnitConvertor(maxTranslate, Unit::Cm, m_oldPieceTranslationUnit));
ui->doubleSpinBoxCurrentPieceBoxPositionY->setValue(0); ui->doubleSpinBoxCurrentPieceBoxPositionY->setValue(0);
connect(ui->comboBoxTranslateUnit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this]() connect(ui->comboBoxTranslateUnit, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
[this, minTranslate, maxTranslate]()
{ {
const Unit newUnit = TranslateUnit(); const Unit newUnit = TranslateUnit();
const qreal oldTranslateX = ui->doubleSpinBoxCurrentPieceBoxPositionX->value(); const qreal oldTranslateX = ui->doubleSpinBoxCurrentPieceBoxPositionX->value();