Fix crash.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-01-21 14:43:45 +02:00
parent 93c84a9dc5
commit d3df063160

View File

@ -1602,12 +1602,15 @@ void MainWindow::ExportToCSVData(const QString &fileName, bool withHeader, int m
//---------------------------------------------------------------------------------------------------------------------
void MainWindow::ScaleChanged(qreal scale)
{
doubleSpinBoxScale->blockSignals(true);
doubleSpinBoxScale->setMaximum(qFloor(VMainGraphicsView::MaxScale()*1000)/10.0);
doubleSpinBoxScale->setMinimum(qFloor(VMainGraphicsView::MinScale()*1000)/10.0);
doubleSpinBoxScale->setValue(qFloor(scale*1000)/10.0);
doubleSpinBoxScale->setSingleStep(1);
doubleSpinBoxScale->blockSignals(false);
if (not doubleSpinBoxScale.isNull())
{
doubleSpinBoxScale->blockSignals(true);
doubleSpinBoxScale->setMaximum(qFloor(VMainGraphicsView::MaxScale()*1000)/10.0);
doubleSpinBoxScale->setMinimum(qFloor(VMainGraphicsView::MinScale()*1000)/10.0);
doubleSpinBoxScale->setValue(qFloor(scale*1000)/10.0);
doubleSpinBoxScale->setSingleStep(1);
doubleSpinBoxScale->blockSignals(false);
}
}
//---------------------------------------------------------------------------------------------------------------------