Fix crash on qmloscilloscope in Qt 5.4

Binding slider value to its minimum value is not correct,
so just initialize it on component complete.

Change-Id: Ia21ecbffdef84448b70c6b09d240ea4f854ca541
Reviewed-by: Mika Salmela <mika.salmela@theqtcompany.com>
This commit is contained in:
Miikka Heikkinen 2014-10-30 13:19:28 +02:00
parent bed7f3fbf6
commit 20d1d25119
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ void DataSource::generateData(int cacheCount, int rowCount, int columnCount,
float xMin, float xMax, float yMin, float yMax,
float zMin, float zMax)
{
if (!cacheCount)
if (!cacheCount || !rowCount || !columnCount)
return;
clearData();

View File

@ -150,7 +150,7 @@ Item {
maximumValue: minimumValue * 10
stepSize: mainView.sampleCache
updateValueWhileDragging: false
value: minimumValue * 2
Component.onCompleted: value = minimumValue * 2
}
Rectangle {