[SailfishDevel] Division by zero in Slider.qml

Matthew Vogt matthew.vogt at jolla.com
Thu Jan 16 22:29:26 UTC 2014


Thanks, I have filed a bug report for this issue.

Matt
________________________________________
From: devel-bounces at lists.sailfishos.org [devel-bounces at lists.sailfishos.org] on behalf of Hendrik Borghorst [hendrikborghorst at gmail.com]
Sent: Thursday, January 16, 2014 9:30 AM
To: Sailfish OS Developers
Subject: [SailfishDevel] Division by zero in Slider.qml

Hello folks,

I've noticed some strange behaviour in Silica Silder. If you set
minimumValue=maximumValue , the handle gets invisible and cannot get activated
again.

if you've a look at (except from Slider.qml) you'll see:

    function _updateHighlightToValue() {
        highlight.x = (sliderValue - minimumValue) / (maximumValue -
minimumValue) * _grooveWidth - highlight.width/2 + leftMargin
    }
that there is a case where an zero divison is done. For example ( min=Max=0 or
min=-5 and max=5)

greetings
_______________________________________________
SailfishOS.org Devel mailing list


More information about the Devel mailing list