Fix Tape crash on opening. Closes #81

(cherry picked from commit 7beac9db5b)
This commit is contained in:
Roman Telezhynskyi 2020-11-22 09:32:33 +02:00
parent e8fd8095b4
commit 219a3e1eab
2 changed files with 11 additions and 2 deletions

View File

@ -1,6 +1,7 @@
# Version 0.7.40 (unreleased) # Version 0.7.40 (unreleased)
- New function Warning. - New function Warning.
- [smart-pattern/valentina#80] Allow insertion of multiple nodes. - [smart-pattern/valentina#80] Allow insertion of multiple nodes.
- [smart-pattern/valentina#81] Tape crash on opening.
# Version 0.7.39 Nov 17, 2020 # Version 0.7.39 Nov 17, 2020
- Fix crash for Line tool notes. - Fix crash for Line tool notes.

View File

@ -635,9 +635,12 @@ void TMainWindow::changeEvent(QEvent *event)
} }
{ {
labelPatternUnit->setText(tr("Pattern unit:")); if (labelPatternUnit)
{
labelPatternUnit->setText(tr("Pattern unit:"));
}
if (comboBoxUnits != nullptr) if (comboBoxUnits)
{ {
const qint32 index = comboBoxUnits->currentIndex(); const qint32 index = comboBoxUnits->currentIndex();
comboBoxUnits->blockSignals(true); comboBoxUnits->blockSignals(true);
@ -4302,6 +4305,11 @@ void TMainWindow::InitComboBoxUnits()
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void TMainWindow::InitMeasurementUnits() void TMainWindow::InitMeasurementUnits()
{ {
if (not m)
{
return;
}
ui->comboBoxMUnits->blockSignals(true); ui->comboBoxMUnits->blockSignals(true);
int current = -1; int current = -1;