<commit_before>
import QtQuick 2.4

import QmlToolbox.Controls 1.0


/**
*  EditorNumber
*
*  Editor for properties of type 'int', 'float', etc. with a spin box
*/
Editor
{
    id: item

    implicitWidth:  input.implicitWidth
    implicitHeight: input.implicitHeight

    SpinBox 
    {
        id: input

        anchors.fill: parent

        onValueChanged:
        {
            if (!internal.noUpdate)
            {
                item.properties.setValue(item.path, item.slot, value / input.scaleFactor);
            }
        }
    }

    onStatusChanged:
    {
        internal.noUpdate = true;

        if (status.hasOwnProperty('decimals')) {
            input.decimals = status.decimals;
        }

        if (status.hasOwnProperty('stepSize')) {
            input.realStepSize = status.stepSize;
        }

        if (status.hasOwnProperty('minimumValue')) {
            input.realFrom = status.minimumValue;
        }

        if (status.hasOwnProperty('maximumValue')) {
            input.realTo = status.maximumValue;
        }

        input.value = status.value * input.scaleFactor;

        internal.noUpdate = false;
    }
<commit_msg>fix floating point to int conversion error<commit_after>
import QtQuick 2.4

import QmlToolbox.Controls 1.0


/**
*  EditorNumber
*
*  Editor for properties of type 'int', 'float', etc. with a spin box
*/
Editor
{
    id: item

    implicitWidth:  input.implicitWidth
    implicitHeight: input.implicitHeight

    SpinBox 
    {
        id: input

        anchors.fill: parent

        onValueChanged:
        {
            if (!internal.noUpdate)
            {
                item.properties.setValue(item.path, item.slot, value / input.scaleFactor);
            }
        }
    }

    onStatusChanged:
    {
        internal.noUpdate = true;

        if (status.hasOwnProperty('decimals')) {
            input.decimals = status.decimals;
        }

        if (status.hasOwnProperty('stepSize')) {
            input.realStepSize = status.stepSize;
        }

        if (status.hasOwnProperty('minimumValue')) {
            input.realFrom = status.minimumValue;
        }

        if (status.hasOwnProperty('maximumValue')) {
            input.realTo = status.maximumValue;
        }

        input.value = Math.round(status.value * input.scaleFactor);

        internal.noUpdate = false;
    }

{'fraction_non_alphanumeric': 0.10233545647558387, 'fraction_numerical': 0.003397027600849257, 'mean_word_length': 1.8523002421307506, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7058683', 'n_tokens_mistral': 701, 'n_tokens_neox': 666, 'n_words': 132}