Comment 9 for bug 1756995

Revision history for this message
Bernhard Stegmaier (stegmaier) wrote :

To be honest, I don't yet have an idea why this doesn't happen on other platforms.
It seems to come from introducing TEXT_CTRL_EVAL.

The TrackStartX has focus when dialog is open and is assigned "<...>" due to selecting more than one segment. When I change track width it loses the focus.
If the TEXT_CTRL_EVAL loses focus it does evaluate contents and sets the text box to it.
"<...>" does evaluate to 0, so "<...>" is replaced by "0".

If I change TEXT_CTRL_EVAL::evaluate() todo nothing in case of "<...>":
<<<
    if( GetValue() != "<...>")
        if( m_eval.process( GetValue().mb_str(), this ) )
            wxTextCtrl::SetValue( wxString::FromUTF8( m_eval.result() ) );
>>>
it works like it should and "<...>" is not overwritten by "0".

I am not really sure whether something like this is already the real fix...