Only switch profiles with slider if there is an added machine

Otherwise we crash and burn.

Contributes to issue CURA-4357.
This commit is contained in:
Ghostkeeper 2017-09-22 12:48:05 +02:00
parent 261089eed3
commit 0183616b8f
No known key found for this signature in database
GPG Key ID: C5F96EE2BC0F7E75

View File

@ -261,12 +261,14 @@ Item
} }
onValueChanged: { onValueChanged: {
if(Cura.MachineManager.activeMachine != null)
//Prevent updating during view initializing. Trigger only if the value changed by user
if(qualityRowSlider.value != qualityRow.qualitySliderSelectedValue)
{ {
//start updating with short delay //Prevent updating during view initializing. Trigger only if the value changed by user
qualitySliderChangeTimer.start(); if(qualityRowSlider.value != qualityRow.qualitySliderSelectedValue)
{
//start updating with short delay
qualitySliderChangeTimer.start();
}
} }
} }
} }