<commit_before>import Qt 4.7
import Bauhaus 1.0

QWidget {
    id: expressionEditor;
    x: 6
    y: -400
    width: frame.width - 22
    height: 40
    property bool active: false
    property variant backendValue;


    onActiveChanged: {
        if (active) {
            textEdit.plainText = backendValue.expression
            textEdit.setFocus();
            opacity = 1;
            height = 60

        } else {
            opacity = 0;
            height = 40;
        }
    }
    opacity: 0
    onOpacityChanged: {
        if (opacity == 0)
            lower();
    }
    Behavior on opacity {
        NumberAnimation {
            duration: 100
        }
    }
    Behavior on height {
        NumberAnimation {
            duration: 100
        }
    }<commit_msg>QmlDesigner.propertyEditor: hide ExpressionEdit if selection changes<commit_after>import Qt 4.7
import Bauhaus 1.0

QWidget {
    id: expressionEditor;
    x: 6
    y: -400
    width: frame.width - 22
    height: 40
    property bool active: false
    property variant backendValue;
    
    property bool selectionFlag: selectionChanged
    
    onSelectionFlagChanged: {
        expressionEdit.active = false;    
    }

    onActiveChanged: {
        if (active) {
            textEdit.plainText = backendValue.expression
            textEdit.setFocus();
            opacity = 1;
            height = 60

        } else {
            opacity = 0;
            height = 40;
        }
    }
    opacity: 0
    onOpacityChanged: {
        if (opacity == 0)
            lower();
    }
    Behavior on opacity {
        NumberAnimation {
            duration: 100
        }
    }
    Behavior on height {
        NumberAnimation {
            duration: 100
        }
    }
{'fraction_non_alphanumeric': 0.07507163323782234, 'fraction_numerical': 0.02979942693409742, 'mean_word_length': 1.4556962025316456, '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': '937996', 'n_tokens_mistral': 525, 'n_tokens_neox': 470, 'n_words': 130}