Change the management of error message for dialog box: if a parameter value is not correct, display a message only when we click on apply or OK buttons (not for cancel or 'x' button).
The application crashes when a parameter is wrong and the textedit has the focus and when we click on 'x' button (the button in the upper right-hand corner).